@flexprice/sdk 2.1.34 → 2.1.36
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 +39 -3
- package/docs/sdk/models/add-addon-ref.md +1 -0
- package/docs/sdk/models/add-addon-request.md +1 -0
- package/docs/sdk/models/add-addon-to-subscription-request.md +1 -0
- package/docs/sdk/models/coupon-ref.md +19 -0
- package/docs/sdk/models/create-credit-grant-request.md +1 -0
- package/docs/sdk/models/create-customer-request.md +7 -0
- package/docs/sdk/models/create-scheduled-task-request.md +1 -1
- package/docs/sdk/models/create-subscription-request.md +1 -0
- package/docs/sdk/models/customer-contact-person.md +25 -0
- package/docs/sdk/models/customer-response.md +2 -0
- package/docs/sdk/models/customer.md +2 -0
- package/docs/sdk/models/external-tax-details.md +25 -0
- package/docs/sdk/models/fx-conversion-source.md +18 -0
- package/docs/sdk/models/fx-conversion.md +21 -0
- package/docs/sdk/models/inline-fx-rate.md +17 -0
- package/docs/sdk/models/invoice-line-item-response.md +1 -0
- package/docs/sdk/models/invoice-response.md +1 -0
- package/docs/sdk/models/line-item-change.md +1 -0
- package/docs/sdk/models/modify-subscription-line-item.md +1 -0
- package/docs/sdk/models/scheduled-task-entity-type.md +1 -1
- package/docs/sdk/models/tax-applied-response.md +5 -1
- package/docs/sdk/models/tax-exemption-reason-code.md +2 -2
- package/docs/sdk/models/tax-jurisdiction.md +18 -0
- package/docs/sdk/models/tax-provider.md +17 -0
- package/docs/sdk/models/tax-rate-entity-type.md +1 -1
- package/docs/sdk/models/tax-reversal-mode.md +17 -0
- package/docs/sdk/models/tax-reversal.md +16 -0
- package/docs/sdk/models/tax-transaction-type.md +17 -0
- package/docs/sdk/models/top-up-coupon.md +17 -0
- package/docs/sdk/models/top-up-wallet-request.md +1 -0
- package/docs/sdk/models/update-customer-request-request.md +7 -1
- package/docs/sdk/models/update-customer-request.md +5 -1
- package/docs/sdk/models/update-subscription-line-item-request.md +20 -18
- package/docs/sdk/models/update-tenant-address.md +20 -0
- package/docs/sdk/models/update-tenant-billing-details.md +18 -0
- package/docs/sdk/models/update-tenant-request.md +5 -5
- package/docs/sdk/models/wallet-transaction-response.md +3 -0
- package/docs/sdk/models/wallet-tx-consumption.md +16 -0
- package/docs/sdk/models/wallet-tx-source-type.md +15 -0
- package/docs/sdk/models/webhook-dto-invoice-line-item.md +1 -0
- package/docs/sdk/models/webhook-dto-invoice.md +1 -0
- package/docs/sdk/models/webhook-dto-tax-applied.md +3 -0
- package/docs/sdk/models/webhook-dto-wallet-transaction.md +3 -0
- package/docs/sdks/customers/README.md +8 -2
- package/esm/hooks/auth-headers.d.ts +4 -0
- package/esm/hooks/auth-headers.d.ts.map +1 -0
- package/esm/hooks/auth-headers.js +35 -0
- package/esm/hooks/auth-headers.js.map +1 -0
- package/esm/hooks/registration.d.ts +2 -3
- package/esm/hooks/registration.d.ts.map +1 -1
- package/esm/hooks/registration.js +4 -4
- package/esm/hooks/registration.js.map +1 -1
- package/esm/lib/config.d.ts +7 -3
- package/esm/lib/config.d.ts.map +1 -1
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/sdk/models/add-addon-ref.d.ts +3 -0
- package/esm/sdk/models/add-addon-ref.d.ts.map +1 -1
- package/esm/sdk/models/add-addon-ref.js +2 -0
- package/esm/sdk/models/add-addon-ref.js.map +1 -1
- package/esm/sdk/models/add-addon-request.d.ts +6 -0
- package/esm/sdk/models/add-addon-request.d.ts.map +1 -1
- package/esm/sdk/models/add-addon-request.js +2 -0
- package/esm/sdk/models/add-addon-request.js.map +1 -1
- package/esm/sdk/models/add-addon-to-subscription-request.d.ts +6 -0
- package/esm/sdk/models/add-addon-to-subscription-request.d.ts.map +1 -1
- package/esm/sdk/models/add-addon-to-subscription-request.js +2 -0
- package/esm/sdk/models/add-addon-to-subscription-request.js.map +1 -1
- package/esm/sdk/models/address.d.ts +0 -12
- package/esm/sdk/models/address.d.ts.map +1 -1
- package/esm/sdk/models/address.js +0 -21
- package/esm/sdk/models/address.js.map +1 -1
- package/esm/sdk/models/coupon-ref.d.ts +20 -0
- package/esm/sdk/models/coupon-ref.d.ts.map +1 -0
- package/esm/sdk/models/coupon-ref.js +25 -0
- package/esm/sdk/models/coupon-ref.js.map +1 -0
- package/esm/sdk/models/create-credit-grant-request.d.ts +3 -0
- package/esm/sdk/models/create-credit-grant-request.d.ts.map +1 -1
- package/esm/sdk/models/create-credit-grant-request.js +3 -0
- package/esm/sdk/models/create-credit-grant-request.js.map +1 -1
- package/esm/sdk/models/create-customer-request.d.ts +11 -0
- package/esm/sdk/models/create-customer-request.d.ts.map +1 -1
- package/esm/sdk/models/create-customer-request.js +5 -0
- package/esm/sdk/models/create-customer-request.js.map +1 -1
- package/esm/sdk/models/create-subscription-request.d.ts +9 -0
- package/esm/sdk/models/create-subscription-request.d.ts.map +1 -1
- package/esm/sdk/models/create-subscription-request.js +3 -0
- package/esm/sdk/models/create-subscription-request.js.map +1 -1
- package/esm/sdk/models/customer-contact-person.d.ts +33 -0
- package/esm/sdk/models/customer-contact-person.d.ts.map +1 -0
- package/esm/sdk/models/customer-contact-person.js +50 -0
- package/esm/sdk/models/customer-contact-person.js.map +1 -0
- package/esm/sdk/models/customer-response.d.ts +6 -0
- package/esm/sdk/models/customer-response.d.ts.map +1 -1
- package/esm/sdk/models/customer-response.js +5 -0
- package/esm/sdk/models/customer-response.js.map +1 -1
- package/esm/sdk/models/customer.d.ts +6 -0
- package/esm/sdk/models/customer.d.ts.map +1 -1
- package/esm/sdk/models/customer.js +5 -0
- package/esm/sdk/models/customer.js.map +1 -1
- package/esm/sdk/models/external-tax-details.d.ts +66 -0
- package/esm/sdk/models/external-tax-details.d.ts.map +1 -0
- package/esm/sdk/models/external-tax-details.js +36 -0
- package/esm/sdk/models/external-tax-details.js.map +1 -0
- package/esm/sdk/models/fx-conversion-source.d.ts +13 -0
- package/esm/sdk/models/fx-conversion-source.d.ts.map +1 -0
- package/esm/sdk/models/fx-conversion-source.js +23 -0
- package/esm/sdk/models/fx-conversion-source.js.map +1 -0
- package/esm/sdk/models/fx-conversion.d.ts +33 -0
- package/esm/sdk/models/fx-conversion.d.ts.map +1 -0
- package/esm/sdk/models/fx-conversion.js +30 -0
- package/esm/sdk/models/fx-conversion.js.map +1 -0
- package/esm/sdk/models/index.d.ts +16 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +16 -0
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/inline-fx-rate.d.ts +16 -0
- package/esm/sdk/models/inline-fx-rate.d.ts.map +1 -0
- package/esm/sdk/models/inline-fx-rate.js +20 -0
- package/esm/sdk/models/inline-fx-rate.js.map +1 -0
- package/esm/sdk/models/invoice-line-item-response.d.ts +2 -0
- package/esm/sdk/models/invoice-line-item-response.d.ts.map +1 -1
- package/esm/sdk/models/invoice-line-item-response.js +3 -0
- package/esm/sdk/models/invoice-line-item-response.js.map +1 -1
- package/esm/sdk/models/invoice-response.d.ts +2 -0
- package/esm/sdk/models/invoice-response.d.ts.map +1 -1
- package/esm/sdk/models/invoice-response.js +3 -0
- package/esm/sdk/models/invoice-response.js.map +1 -1
- package/esm/sdk/models/line-item-change.d.ts +6 -0
- package/esm/sdk/models/line-item-change.d.ts.map +1 -1
- package/esm/sdk/models/line-item-change.js +2 -0
- package/esm/sdk/models/line-item-change.js.map +1 -1
- package/esm/sdk/models/modify-subscription-line-item.d.ts +3 -0
- package/esm/sdk/models/modify-subscription-line-item.d.ts.map +1 -1
- package/esm/sdk/models/modify-subscription-line-item.js +2 -0
- package/esm/sdk/models/modify-subscription-line-item.js.map +1 -1
- package/esm/sdk/models/scheduled-task-entity-type.d.ts +1 -0
- package/esm/sdk/models/scheduled-task-entity-type.d.ts.map +1 -1
- package/esm/sdk/models/scheduled-task-entity-type.js +1 -0
- package/esm/sdk/models/scheduled-task-entity-type.js.map +1 -1
- package/esm/sdk/models/tax-applied-response.d.ts +13 -0
- package/esm/sdk/models/tax-applied-response.d.ts.map +1 -1
- package/esm/sdk/models/tax-applied-response.js +10 -0
- package/esm/sdk/models/tax-applied-response.js.map +1 -1
- package/esm/sdk/models/tax-exemption-reason-code.d.ts +4 -0
- package/esm/sdk/models/tax-exemption-reason-code.d.ts.map +1 -1
- package/esm/sdk/models/tax-exemption-reason-code.js +4 -0
- package/esm/sdk/models/tax-exemption-reason-code.js.map +1 -1
- package/esm/sdk/models/tax-jurisdiction.d.ts +13 -0
- package/esm/sdk/models/tax-jurisdiction.d.ts.map +1 -0
- package/esm/sdk/models/tax-jurisdiction.js +22 -0
- package/esm/sdk/models/tax-jurisdiction.js.map +1 -0
- package/esm/sdk/models/tax-provider.d.ts +10 -0
- package/esm/sdk/models/tax-provider.d.ts.map +1 -0
- package/esm/sdk/models/tax-provider.js +11 -0
- package/esm/sdk/models/tax-provider.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/tax-reversal-mode.d.ts +10 -0
- package/esm/sdk/models/tax-reversal-mode.d.ts.map +1 -0
- package/esm/sdk/models/tax-reversal-mode.js +11 -0
- package/esm/sdk/models/tax-reversal-mode.js.map +1 -0
- package/esm/sdk/models/tax-reversal.d.ts +12 -0
- package/esm/sdk/models/tax-reversal.d.ts.map +1 -0
- package/esm/sdk/models/tax-reversal.js +22 -0
- package/esm/sdk/models/tax-reversal.js.map +1 -0
- package/esm/sdk/models/tax-transaction-type.d.ts +10 -0
- package/esm/sdk/models/tax-transaction-type.d.ts.map +1 -0
- package/esm/sdk/models/tax-transaction-type.js +11 -0
- package/esm/sdk/models/tax-transaction-type.js.map +1 -0
- package/esm/sdk/models/tenant-billing-details.d.ts +1 -11
- package/esm/sdk/models/tenant-billing-details.d.ts.map +1 -1
- package/esm/sdk/models/tenant-billing-details.js +1 -15
- package/esm/sdk/models/tenant-billing-details.js.map +1 -1
- package/esm/sdk/models/top-up-coupon.d.ts +12 -0
- package/esm/sdk/models/top-up-coupon.d.ts.map +1 -0
- package/esm/sdk/models/top-up-coupon.js +17 -0
- package/esm/sdk/models/top-up-coupon.js.map +1 -0
- package/esm/sdk/models/top-up-wallet-request.d.ts +3 -0
- package/esm/sdk/models/top-up-wallet-request.d.ts.map +1 -1
- package/esm/sdk/models/top-up-wallet-request.js +2 -0
- package/esm/sdk/models/top-up-wallet-request.js.map +1 -1
- package/esm/sdk/models/update-customer-request.d.ts +11 -0
- package/esm/sdk/models/update-customer-request.d.ts.map +1 -1
- package/esm/sdk/models/update-customer-request.js +5 -0
- package/esm/sdk/models/update-customer-request.js.map +1 -1
- package/esm/sdk/models/update-subscription-line-item-request.d.ts +10 -0
- package/esm/sdk/models/update-subscription-line-item-request.d.ts.map +1 -1
- package/esm/sdk/models/update-subscription-line-item-request.js +4 -0
- package/esm/sdk/models/update-subscription-line-item-request.js.map +1 -1
- package/esm/sdk/models/update-tenant-address.d.ts +22 -0
- package/esm/sdk/models/update-tenant-address.d.ts.map +1 -0
- package/esm/sdk/models/update-tenant-address.js +27 -0
- package/esm/sdk/models/update-tenant-address.js.map +1 -0
- package/esm/sdk/models/update-tenant-billing-details.d.ts +19 -0
- package/esm/sdk/models/update-tenant-billing-details.d.ts.map +1 -0
- package/esm/sdk/models/update-tenant-billing-details.js +21 -0
- package/esm/sdk/models/update-tenant-billing-details.js.map +1 -0
- package/esm/sdk/models/update-tenant-request.d.ts +3 -3
- package/esm/sdk/models/update-tenant-request.d.ts.map +1 -1
- package/esm/sdk/models/update-tenant-request.js +2 -2
- package/esm/sdk/models/update-tenant-request.js.map +1 -1
- package/esm/sdk/models/wallet-transaction-response.d.ts +8 -0
- package/esm/sdk/models/wallet-transaction-response.d.ts.map +1 -1
- package/esm/sdk/models/wallet-transaction-response.js +8 -0
- package/esm/sdk/models/wallet-transaction-response.js.map +1 -1
- package/esm/sdk/models/wallet-tx-consumption.d.ts +11 -0
- package/esm/sdk/models/wallet-tx-consumption.d.ts.map +1 -0
- package/esm/sdk/models/wallet-tx-consumption.js +20 -0
- package/esm/sdk/models/wallet-tx-consumption.js.map +1 -0
- package/esm/sdk/models/wallet-tx-source-type.d.ts +9 -0
- package/esm/sdk/models/wallet-tx-source-type.d.ts.map +1 -0
- package/esm/sdk/models/wallet-tx-source-type.js +10 -0
- package/esm/sdk/models/wallet-tx-source-type.js.map +1 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts +2 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice-line-item.js +3 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.js.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice.d.ts +2 -0
- package/esm/sdk/models/webhook-dto-invoice.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice.js +3 -0
- package/esm/sdk/models/webhook-dto-invoice.js.map +1 -1
- package/esm/sdk/models/webhook-dto-tax-applied.d.ts +6 -0
- package/esm/sdk/models/webhook-dto-tax-applied.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-tax-applied.js +8 -0
- package/esm/sdk/models/webhook-dto-tax-applied.js.map +1 -1
- package/esm/sdk/models/webhook-dto-wallet-transaction.d.ts +5 -0
- package/esm/sdk/models/webhook-dto-wallet-transaction.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-wallet-transaction.js +8 -0
- package/esm/sdk/models/webhook-dto-wallet-transaction.js.map +1 -1
- package/esm/types/smart-union.d.ts.map +1 -1
- package/esm/types/smart-union.js +13 -8
- package/esm/types/smart-union.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/hooks/auth-headers.ts +47 -0
- package/src/hooks/registration.ts +4 -4
- package/src/lib/config.ts +7 -3
- package/src/sdk/models/add-addon-ref.ts +8 -0
- package/src/sdk/models/add-addon-request.ts +11 -0
- package/src/sdk/models/add-addon-to-subscription-request.ts +11 -0
- package/src/sdk/models/address.ts +0 -35
- package/src/sdk/models/coupon-ref.ts +50 -0
- package/src/sdk/models/create-credit-grant-request.ts +8 -0
- package/src/sdk/models/create-customer-request.ts +19 -0
- package/src/sdk/models/create-subscription-request.ts +15 -0
- package/src/sdk/models/customer-contact-person.ts +101 -0
- package/src/sdk/models/customer-response.ts +15 -0
- package/src/sdk/models/customer.ts +15 -0
- package/src/sdk/models/external-tax-details.ts +113 -0
- package/src/sdk/models/fx-conversion-source.ts +46 -0
- package/src/sdk/models/fx-conversion.ts +72 -0
- package/src/sdk/models/index.ts +16 -0
- package/src/sdk/models/inline-fx-rate.ts +41 -0
- package/src/sdk/models/invoice-line-item-response.ts +4 -0
- package/src/sdk/models/invoice-response.ts +4 -0
- package/src/sdk/models/line-item-change.ts +11 -0
- package/src/sdk/models/modify-subscription-line-item.ts +8 -0
- package/src/sdk/models/scheduled-task-entity-type.ts +1 -0
- package/src/sdk/models/tax-applied-response.ts +26 -0
- package/src/sdk/models/tax-exemption-reason-code.ts +4 -0
- package/src/sdk/models/tax-jurisdiction.ts +45 -0
- package/src/sdk/models/tax-provider.ts +17 -0
- package/src/sdk/models/tax-rate-entity-type.ts +1 -0
- package/src/sdk/models/tax-reversal-mode.ts +19 -0
- package/src/sdk/models/tax-reversal.ts +43 -0
- package/src/sdk/models/tax-transaction-type.ts +19 -0
- package/src/sdk/models/tenant-billing-details.ts +1 -38
- package/src/sdk/models/top-up-coupon.ts +34 -0
- package/src/sdk/models/top-up-wallet-request.ts +8 -0
- package/src/sdk/models/update-customer-request.ts +19 -0
- package/src/sdk/models/update-subscription-line-item-request.ts +14 -0
- package/src/sdk/models/update-tenant-address.ts +58 -0
- package/src/sdk/models/update-tenant-billing-details.ts +52 -0
- package/src/sdk/models/update-tenant-request.ts +7 -7
- package/src/sdk/models/wallet-transaction-response.ts +22 -0
- package/src/sdk/models/wallet-tx-consumption.ts +41 -0
- package/src/sdk/models/wallet-tx-source-type.ts +16 -0
- package/src/sdk/models/webhook-dto-invoice-line-item.ts +4 -0
- package/src/sdk/models/webhook-dto-invoice.ts +4 -0
- package/src/sdk/models/webhook-dto-tax-applied.ts +17 -0
- package/src/sdk/models/webhook-dto-wallet-transaction.ts +19 -0
- package/src/types/smart-union.ts +17 -8
package/README.md
CHANGED
|
@@ -126,9 +126,41 @@ const result = await flexPrice.events.ingestEvent({
|
|
|
126
126
|
|
|
127
127
|
## Authentication
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
The SDK supports two credentials. Set one of them, not both.
|
|
130
|
+
|
|
131
|
+
| Option | Header | Use it for |
|
|
132
|
+
| ------ | ------ | ---------- |
|
|
133
|
+
| `apiKeyAuth` | `x-api-key` | Servers and scripts |
|
|
134
|
+
| `bearerAuth` | `Authorization: Bearer <token>` | A browser app acting as a signed-in FlexPrice user |
|
|
135
|
+
|
|
136
|
+
**API key (server side).** Set the key via `apiKeyAuth`. Keys created in the dashboard are bound to one environment, so no other option is needed.
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
140
|
+
|
|
141
|
+
const flexprice = new Flexprice({ apiKeyAuth: process.env.FLEXPRICE_API_KEY! });
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Signed-in user (browser).** Pass the user's JWT via `bearerAuth`, and the active environment via `environmentId`, which is sent as `X-Environment-ID`. Most endpoints are scoped to an environment and return 403 without it.
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
148
|
+
|
|
149
|
+
const flexprice = new Flexprice({
|
|
150
|
+
serverURL: "https://us.api.flexprice.io/v1",
|
|
151
|
+
bearerAuth: async () => getAccessToken(),
|
|
152
|
+
environmentId: () => getActiveEnvironmentId(),
|
|
153
|
+
});
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
- Both options take a string or a function, so a refreshed token or a switched environment applies without creating a new client. The SDK does not refresh tokens itself.
|
|
157
|
+
- A `bearerAuth` function is called before every attempt, retries included. An `environmentId` function is called once per API call, so a retry never switches environments.
|
|
158
|
+
- If the value or the function result is empty, that header is not sent.
|
|
159
|
+
- Headers passed on a single call (`{ headers: { ... } }`) take precedence over these options, and the matching option's function is not called.
|
|
160
|
+
- `environmentId` also works with `apiKeyAuth`. The API ignores it for keys bound to an environment.
|
|
161
|
+
- Setting both `apiKeyAuth` and `bearerAuth` fails every call with an `UnexpectedClientError` before anything is sent.
|
|
162
|
+
|
|
163
|
+
Set `FLEXPRICE_API_HOST` to a full URL (see [Environment](#environment)) or rely on the default `https://us.api.flexprice.io/v1`.
|
|
132
164
|
|
|
133
165
|
## Features
|
|
134
166
|
|
|
@@ -142,6 +174,10 @@ For a full list of operations, see the [API reference](https://docs.flexprice.io
|
|
|
142
174
|
## Troubleshooting
|
|
143
175
|
|
|
144
176
|
- **Missing or invalid API key:** Ensure `apiKeyAuth` is set and the key is active. Use server-side only.
|
|
177
|
+
- **401 with `bearerAuth`:** The token is missing or expired. Check that your token function returns a current JWT.
|
|
178
|
+
- **403 with `bearerAuth`:** Set `environmentId`. Dashboard login tokens are not bound to an environment.
|
|
179
|
+
- **"set either apiKeyAuth or bearerAuth, not both":** Remove one of the two options from the constructor.
|
|
180
|
+
- **`debugLogger`:** It prints every request header, including `Authorization` and `x-api-key`. Use it only for local debugging.
|
|
145
181
|
- **Wrong server URL:** Use a full URL such as `https://us.api.flexprice.io/v1` (include `/v1`; no trailing slash).
|
|
146
182
|
- **Validation or 4xx errors:** Confirm request body field names (snake_case vs camelCase) and required fields against the [API docs](https://docs.flexprice.io).
|
|
147
183
|
- **Parameter passing:** Pass the request object directly to methods (e.g. `ingestEvent({ ... })`), not wrapped in an extra key, unless the SDK docs say otherwise.
|
|
@@ -15,5 +15,6 @@ let value: AddAddonRef = {};
|
|
|
15
15
|
| `addonId` | *string* | :heavy_minus_sign: | N/A |
|
|
16
16
|
| `associationId` | *string* | :heavy_minus_sign: | N/A |
|
|
17
17
|
| `cadence` | [models.AddonCadence](../../sdk/models/addon-cadence.md) | :heavy_minus_sign: | N/A |
|
|
18
|
+
| `coupons` | [models.CouponRef](../../sdk/models/coupon-ref.md)[] | :heavy_minus_sign: | N/A |
|
|
18
19
|
| `prorationBehavior` | [models.ProrationBehavior](../../sdk/models/proration-behavior.md) | :heavy_minus_sign: | N/A |
|
|
19
20
|
| `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
|
|
@@ -19,6 +19,7 @@ let value: AddAddonRequest = {
|
|
|
19
19
|
| `cadence` | [models.AddonCadence](../../sdk/models/addon-cadence.md) | :heavy_minus_sign: | N/A |
|
|
20
20
|
| `changeAt` | [models.ScheduleType](../../sdk/models/schedule-type.md) | :heavy_minus_sign: | N/A |
|
|
21
21
|
| `checkout` | [models.CheckoutParams](../../sdk/models/checkout-params.md) | :heavy_minus_sign: | N/A |
|
|
22
|
+
| `coupons` | [models.SubscriptionCouponInput](../../sdk/models/subscription-coupon-input.md)[] | :heavy_minus_sign: | Coupons apply to this addon's line items; price_id targets one price, omitted targets all. |
|
|
22
23
|
| `lineItemCommitments` | Record<string, [models.LineItemCommitmentConfig](../../sdk/models/line-item-commitment-config.md)> | :heavy_minus_sign: | LineItemCommitments allows setting commitment configuration per addon line item (keyed by price_id) |
|
|
23
24
|
| `metadata` | Record<string, *any*> | :heavy_minus_sign: | N/A |
|
|
24
25
|
| `overrideLineItems` | [models.OverrideLineItemRequest](../../sdk/models/override-line-item-request.md)[] | :heavy_minus_sign: | OverrideLineItems allows overriding price/quantity/billing model for specific addon prices |
|
|
@@ -17,6 +17,7 @@ let value: AddAddonToSubscriptionRequest = {
|
|
|
17
17
|
| `addonId` | *string* | :heavy_check_mark: | N/A |
|
|
18
18
|
| `cadence` | [models.AddonCadence](../../sdk/models/addon-cadence.md) | :heavy_minus_sign: | N/A |
|
|
19
19
|
| `changeAt` | [models.ScheduleType](../../sdk/models/schedule-type.md) | :heavy_minus_sign: | N/A |
|
|
20
|
+
| `coupons` | [models.SubscriptionCouponInput](../../sdk/models/subscription-coupon-input.md)[] | :heavy_minus_sign: | Coupons apply to this addon's line items; price_id targets one price, omitted targets all. |
|
|
20
21
|
| `lineItemCommitments` | Record<string, [models.LineItemCommitmentConfig](../../sdk/models/line-item-commitment-config.md)> | :heavy_minus_sign: | LineItemCommitments allows setting commitment configuration per addon line item (keyed by price_id) |
|
|
21
22
|
| `metadata` | Record<string, *any*> | :heavy_minus_sign: | N/A |
|
|
22
23
|
| `overrideLineItems` | [models.OverrideLineItemRequest](../../sdk/models/override-line-item-request.md)[] | :heavy_minus_sign: | OverrideLineItems allows overriding price/quantity/billing model for specific addon prices |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# CouponRef
|
|
2
|
+
|
|
3
|
+
## Example Usage
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { CouponRef } from "@flexprice/sdk/sdk/models";
|
|
7
|
+
|
|
8
|
+
let value: CouponRef = {};
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Fields
|
|
12
|
+
|
|
13
|
+
| Field | Type | Required | Description |
|
|
14
|
+
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `associationId` | *string* | :heavy_minus_sign: | N/A |
|
|
16
|
+
| `couponId` | *string* | :heavy_minus_sign: | N/A |
|
|
17
|
+
| `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
|
|
18
|
+
| `priceId` | *string* | :heavy_minus_sign: | N/A |
|
|
19
|
+
| `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
|
|
@@ -31,6 +31,7 @@ let value: CreateCreditGrantRequest = {
|
|
|
31
31
|
| `periodCount` | *number* | :heavy_minus_sign: | N/A |
|
|
32
32
|
| `planId` | *string* | :heavy_minus_sign: | N/A |
|
|
33
33
|
| `priority` | *number* | :heavy_minus_sign: | N/A |
|
|
34
|
+
| `prorationBehavior` | [models.ProrationBehavior](../../sdk/models/proration-behavior.md) | :heavy_minus_sign: | N/A |
|
|
34
35
|
| `scope` | [models.CreditGrantScope](../../sdk/models/credit-grant-scope.md) | :heavy_check_mark: | N/A |
|
|
35
36
|
| `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
|
|
36
37
|
| `subscriptionId` | *string* | :heavy_minus_sign: | N/A |
|
|
@@ -8,6 +8,11 @@ Request object for creating a new customer in the system
|
|
|
8
8
|
import { CreateCustomerRequest } from "@flexprice/sdk/sdk/models";
|
|
9
9
|
|
|
10
10
|
let value: CreateCustomerRequest = {
|
|
11
|
+
contactPersons: [
|
|
12
|
+
{
|
|
13
|
+
firstName: "Ryan",
|
|
14
|
+
},
|
|
15
|
+
],
|
|
11
16
|
externalId: "<id>",
|
|
12
17
|
name: "<value>",
|
|
13
18
|
};
|
|
@@ -23,7 +28,9 @@ let value: CreateCustomerRequest = {
|
|
|
23
28
|
| `addressLine2` | *string* | :heavy_minus_sign: | address_line2 is the secondary address line with maximum 255 characters |
|
|
24
29
|
| `addressPostalCode` | *string* | :heavy_minus_sign: | address_postal_code is the ZIP code or postal code with maximum 20 characters |
|
|
25
30
|
| `addressState` | *string* | :heavy_minus_sign: | address_state is the state, province, or region name with maximum 100 characters |
|
|
31
|
+
| `billingCurrency` | *string* | :heavy_minus_sign: | billing_currency is the fiat currency invoices are issued in; empty means the charge currency is used as-is |
|
|
26
32
|
| `contact` | *string* | :heavy_minus_sign: | contact is an optional contact number for the customer (e.g. phone) |
|
|
33
|
+
| `contactPersons` | [models.CustomerContactPerson](../../sdk/models/customer-contact-person.md)[] | :heavy_check_mark: | contact_persons are people at the customer; at most one may be primary |
|
|
27
34
|
| `email` | *string* | :heavy_minus_sign: | email is the customer's email address and must be a valid email format if provided |
|
|
28
35
|
| `externalId` | *string* | :heavy_check_mark: | external_id is the unique identifier from your system to reference this customer (required) |
|
|
29
36
|
| `integrationEntityMapping` | [models.CreateEntityIntegrationMappingRequest](../../sdk/models/create-entity-integration-mapping-request.md)[] | :heavy_minus_sign: | integration_entity_mapping contains provider integration mappings for this customer |
|
|
@@ -33,6 +33,7 @@ let value: CreateSubscriptionRequest = {
|
|
|
33
33
|
| `enableTrueUp` | *boolean* | :heavy_minus_sign: | N/A |
|
|
34
34
|
| `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
|
|
35
35
|
| `externalCustomerId` | *string* | :heavy_minus_sign: | N/A |
|
|
36
|
+
| `fxRates` | [models.InlineFXRate](../../sdk/models/inline-fx-rate.md)[] | :heavy_minus_sign: | FxRates sets subscription-scope rates to the invoicing customer's billing currency, one per<br/>non-overlapping window. Rejected when nothing needs converting or the pair has no tenant rate. |
|
|
36
37
|
| `gatewayPaymentMethodId` | *string* | :heavy_minus_sign: | N/A |
|
|
37
38
|
| `includePriceIds` | *string*[] | :heavy_minus_sign: | IncludePriceIDs selects which plan prices to attach. Nil/omitted attaches matching-cadence<br/>prices plus ONETIME; [] attaches none (LineItems extras still apply); a non-empty list<br/>attaches only those IDs. Each listed ID must belong to the plan, match the subscription<br/>currency, and have a cadence that equals or strictly divides the subscription cadence.<br/>Pointer-slice distinguishes nil from [].<br/>NOTE: no `dive,required` on this tag — swaggo misinterprets `required`<br/>inside `dive` as marking the whole field required, which then shows up<br/>in the OpenAPI schema and breaks callers that omit the field. Per-element<br/>non-emptiness is enforced explicitly in Validate() below. |
|
|
38
39
|
| `inheritance` | [models.SubscriptionInheritanceConfig](../../sdk/models/subscription-inheritance-config.md) | :heavy_minus_sign: | N/A |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# CustomerContactPerson
|
|
2
|
+
|
|
3
|
+
## Example Usage
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { CustomerContactPerson } from "@flexprice/sdk/sdk/models";
|
|
7
|
+
|
|
8
|
+
let value: CustomerContactPerson = {
|
|
9
|
+
firstName: "Burley",
|
|
10
|
+
};
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Fields
|
|
14
|
+
|
|
15
|
+
| Field | Type | Required | Description |
|
|
16
|
+
| ------------------ | ------------------ | ------------------ | ------------------ |
|
|
17
|
+
| `department` | *string* | :heavy_minus_sign: | N/A |
|
|
18
|
+
| `designation` | *string* | :heavy_minus_sign: | N/A |
|
|
19
|
+
| `email` | *string* | :heavy_minus_sign: | N/A |
|
|
20
|
+
| `firstName` | *string* | :heavy_check_mark: | N/A |
|
|
21
|
+
| `id` | *string* | :heavy_minus_sign: | N/A |
|
|
22
|
+
| `isPrimary` | *boolean* | :heavy_minus_sign: | N/A |
|
|
23
|
+
| `lastName` | *string* | :heavy_minus_sign: | N/A |
|
|
24
|
+
| `mobile` | *string* | :heavy_minus_sign: | N/A |
|
|
25
|
+
| `salutation` | *string* | :heavy_minus_sign: | N/A |
|
|
@@ -20,7 +20,9 @@ let value: CustomerResponse = {};
|
|
|
20
20
|
| `addressLine2` | *string* | :heavy_minus_sign: | AddressLine2 is the second line of the customer's address |
|
|
21
21
|
| `addressPostalCode` | *string* | :heavy_minus_sign: | AddressPostalCode is the postal code of the customer's address |
|
|
22
22
|
| `addressState` | *string* | :heavy_minus_sign: | AddressState is the state of the customer's address |
|
|
23
|
+
| `billingCurrency` | *string* | :heavy_minus_sign: | BillingCurrency is the fiat currency invoices are issued in; nil means charge currency is used as-is. |
|
|
23
24
|
| `contact` | *string* | :heavy_minus_sign: | Contact is an optional contact number for the customer (e.g. phone) |
|
|
25
|
+
| `contactPersons` | [models.CustomerContactPerson](../../sdk/models/customer-contact-person.md)[] | :heavy_minus_sign: | N/A |
|
|
24
26
|
| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
|
|
25
27
|
| `createdBy` | *string* | :heavy_minus_sign: | N/A |
|
|
26
28
|
| `email` | *string* | :heavy_minus_sign: | Email is the email of the customer |
|
|
@@ -18,7 +18,9 @@ let value: Customer = {};
|
|
|
18
18
|
| `addressLine2` | *string* | :heavy_minus_sign: | AddressLine2 is the second line of the customer's address |
|
|
19
19
|
| `addressPostalCode` | *string* | :heavy_minus_sign: | AddressPostalCode is the postal code of the customer's address |
|
|
20
20
|
| `addressState` | *string* | :heavy_minus_sign: | AddressState is the state of the customer's address |
|
|
21
|
+
| `billingCurrency` | *string* | :heavy_minus_sign: | BillingCurrency is the fiat currency invoices are issued in; nil means charge currency is used as-is. |
|
|
21
22
|
| `contact` | *string* | :heavy_minus_sign: | Contact is an optional contact number for the customer (e.g. phone) |
|
|
23
|
+
| `contactPersons` | [models.CustomerContactPerson](../../sdk/models/customer-contact-person.md)[] | :heavy_minus_sign: | N/A |
|
|
22
24
|
| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
|
|
23
25
|
| `createdBy` | *string* | :heavy_minus_sign: | N/A |
|
|
24
26
|
| `email` | *string* | :heavy_minus_sign: | Email is the email of the customer |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# ExternalTaxDetails
|
|
2
|
+
|
|
3
|
+
## Example Usage
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { ExternalTaxDetails } from "@flexprice/sdk/sdk/models";
|
|
7
|
+
|
|
8
|
+
let value: ExternalTaxDetails = {};
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Fields
|
|
12
|
+
|
|
13
|
+
| Field | Type | Required | Description |
|
|
14
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `calculationExpiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | CalculationExpiresAt is when the calculation can no longer be filed, RFC3339. |
|
|
16
|
+
| `calculationId` | *string* | :heavy_minus_sign: | CalculationID is the provider calculation this row was written from. Commit files it. |
|
|
17
|
+
| `displayName` | *string* | :heavy_minus_sign: | DisplayName is the engine's own name for the tax, such as<br/>"Integrated goods and services tax (IGST)". |
|
|
18
|
+
| `jurisdiction` | [models.TaxJurisdiction](../../sdk/models/tax-jurisdiction.md) | :heavy_minus_sign: | N/A |
|
|
19
|
+
| `percentage` | *string* | :heavy_minus_sign: | Percentage is the resolved rate, such as "18.0". This is what was charged, not the<br/>rate that would apply if the tax were imposed. |
|
|
20
|
+
| `reference` | *string* | :heavy_minus_sign: | Reference is what this row's provider transaction was filed under. It is unique across<br/>every transaction on the account, so it is also the only way back to a transaction whose<br/>id failed to land here. |
|
|
21
|
+
| `reversal` | [models.TaxReversal](../../sdk/models/tax-reversal.md) | :heavy_minus_sign: | N/A |
|
|
22
|
+
| `sourcing` | *string* | :heavy_minus_sign: | Sourcing is whether the jurisdiction followed the seller's address or the buyer's. |
|
|
23
|
+
| `taxCode` | *string* | :heavy_minus_sign: | TaxCode is the product tax category the engine priced against, such as txcd_10000000.<br/>It belongs to the line rather than the rate, so today every row on an invoice carries<br/>the account default. It only varies once tax is calculated per line item. |
|
|
24
|
+
| `taxType` | *string* | :heavy_minus_sign: | TaxType is the tax family, such as vat, igst or sales_tax. |
|
|
25
|
+
| `taxabilityReason` | *string* | :heavy_minus_sign: | TaxabilityReason is why the engine charged what it did, such as standard_rated or<br/>reverse_charge. Recorded, not yet rendered. |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# FxConversionSource
|
|
2
|
+
|
|
3
|
+
## Example Usage
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { FxConversionSource } from "@flexprice/sdk/sdk/models";
|
|
7
|
+
|
|
8
|
+
let value: FxConversionSource = {};
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Fields
|
|
12
|
+
|
|
13
|
+
| Field | Type | Required | Description |
|
|
14
|
+
| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- |
|
|
15
|
+
| `net` | *string* | :heavy_minus_sign: | N/A |
|
|
16
|
+
| `subtotal` | *string* | :heavy_minus_sign: | N/A |
|
|
17
|
+
| `totalDiscount` | *string* | :heavy_minus_sign: | N/A |
|
|
18
|
+
| `totalPrepaidCreditsApplied` | *string* | :heavy_minus_sign: | N/A |
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# FxConversion
|
|
2
|
+
|
|
3
|
+
## Example Usage
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { FxConversion } from "@flexprice/sdk/sdk/models";
|
|
7
|
+
|
|
8
|
+
let value: FxConversion = {};
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Fields
|
|
12
|
+
|
|
13
|
+
| Field | Type | Required | Description |
|
|
14
|
+
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `billingCurrency` | *string* | :heavy_minus_sign: | BillingCurrency is the currency the invoice was issued in. |
|
|
16
|
+
| `chargeCurrency` | *string* | :heavy_minus_sign: | ChargeCurrency is the invoice's original (draft) currency. |
|
|
17
|
+
| `convertedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ConvertedAt is when the conversion ran. |
|
|
18
|
+
| `rate` | *string* | :heavy_minus_sign: | Rate is the frozen rate: billing per 1 charge unit. |
|
|
19
|
+
| `rateId` | *string* | :heavy_minus_sign: | RateID is the fx_rates row used, for reference only; never read again. |
|
|
20
|
+
| `scope` | [models.FXRateScope](../../sdk/models/fx-rate-scope.md) | :heavy_minus_sign: | N/A |
|
|
21
|
+
| `source` | [models.FxConversionSource](../../sdk/models/fx-conversion-source.md) | :heavy_minus_sign: | N/A |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# InlineFXRate
|
|
2
|
+
|
|
3
|
+
## Example Usage
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { InlineFXRate } from "@flexprice/sdk/sdk/models";
|
|
7
|
+
|
|
8
|
+
let value: InlineFXRate = {};
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Fields
|
|
12
|
+
|
|
13
|
+
| Field | Type | Required | Description |
|
|
14
|
+
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
|
|
16
|
+
| `rate` | *string* | :heavy_minus_sign: | N/A |
|
|
17
|
+
| `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
|
|
@@ -24,6 +24,7 @@ let value: InvoiceLineItemResponse = {};
|
|
|
24
24
|
| `entityId` | *string* | :heavy_minus_sign: | N/A |
|
|
25
25
|
| `entityType` | *string* | :heavy_minus_sign: | N/A |
|
|
26
26
|
| `environmentId` | *string* | :heavy_minus_sign: | N/A |
|
|
27
|
+
| `fxConversion` | [models.FxConversion](../../sdk/models/fx-conversion.md) | :heavy_minus_sign: | N/A |
|
|
27
28
|
| `id` | *string* | :heavy_minus_sign: | N/A |
|
|
28
29
|
| `invoiceId` | *string* | :heavy_minus_sign: | N/A |
|
|
29
30
|
| `invoiceLevelDiscount` | *string* | :heavy_minus_sign: | invoice_level_discount is the discount amount in invoice currency applied to all line items on the invoice. |
|
|
@@ -140,6 +140,7 @@ let value: InvoiceResponse = {
|
|
|
140
140
|
| `dueDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | due_date is the date when payment for this invoice is due |
|
|
141
141
|
| `environmentId` | *string* | :heavy_minus_sign: | environment_id is the ID of the environment this invoice belongs to (for multi-environment setups) |
|
|
142
142
|
| `finalizedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | finalized_at is the timestamp when this invoice was finalized and made ready for payment |
|
|
143
|
+
| `fxConversion` | [models.FxConversion](../../sdk/models/fx-conversion.md) | :heavy_minus_sign: | N/A |
|
|
143
144
|
| `id` | *string* | :heavy_minus_sign: | id is the unique identifier for this invoice |
|
|
144
145
|
| `idempotencyKey` | *string* | :heavy_minus_sign: | idempotency_key is a unique key used to prevent duplicate invoice creation when retrying API calls |
|
|
145
146
|
| `invoiceNumber` | *string* | :heavy_minus_sign: | invoice_number is the human-readable invoice number displayed to customers (e.g., INV-2024-001) |
|
|
@@ -15,6 +15,7 @@ let value: LineItemChange = {
|
|
|
15
15
|
| Field | Type | Required | Description |
|
|
16
16
|
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
17
17
|
| `amount` | *string* | :heavy_minus_sign: | Amount reprices the charge. Flat fee only for now. |
|
|
18
|
+
| `coupons` | [models.SubscriptionCouponInput](../../sdk/models/subscription-coupon-input.md)[] | :heavy_minus_sign: | Coupons apply to the new line item created by this change. |
|
|
18
19
|
| `effectiveDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
|
|
19
20
|
| `id` | *string* | :heavy_check_mark: | N/A |
|
|
20
21
|
| `quantity` | *string* | :heavy_minus_sign: | N/A |
|
|
@@ -13,6 +13,7 @@ let value: ModifySubscriptionLineItem = {};
|
|
|
13
13
|
| Field | Type | Required | Description |
|
|
14
14
|
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
15
15
|
| `amount` | *string* | :heavy_minus_sign: | N/A |
|
|
16
|
+
| `coupons` | [models.CouponRef](../../sdk/models/coupon-ref.md)[] | :heavy_minus_sign: | N/A |
|
|
16
17
|
| `effectiveDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
|
|
17
18
|
| `lineItemId` | *string* | :heavy_minus_sign: | N/A |
|
|
18
19
|
| `quantity` | *string* | :heavy_minus_sign: | N/A |
|
|
@@ -13,5 +13,5 @@ let value: ScheduledTaskEntityType = "invoice";
|
|
|
13
13
|
## Values
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
"events" | "invoice" | "credit_topups" | "credit_usage" | "usage_analytics" | "revenue_facts" | Unrecognized<string>
|
|
16
|
+
"events" | "invoice" | "credit_topups" | "wallet_debits" | "credit_usage" | "usage_analytics" | "revenue_facts" | Unrecognized<string>
|
|
17
17
|
```
|
|
@@ -19,15 +19,19 @@ let value: TaxAppliedResponse = {};
|
|
|
19
19
|
| `entityId` | *string* | :heavy_minus_sign: | N/A |
|
|
20
20
|
| `entityType` | [models.TaxRateEntityType](../../sdk/models/tax-rate-entity-type.md) | :heavy_minus_sign: | N/A |
|
|
21
21
|
| `environmentId` | *string* | :heavy_minus_sign: | N/A |
|
|
22
|
+
| `externalTaxDetails` | [models.ExternalTaxDetails](../../sdk/models/external-tax-details.md) | :heavy_minus_sign: | N/A |
|
|
22
23
|
| `id` | *string* | :heavy_minus_sign: | N/A |
|
|
23
24
|
| `idempotencyKey` | *string* | :heavy_minus_sign: | N/A |
|
|
24
25
|
| `metadata` | Record<string, *string*> | :heavy_minus_sign: | N/A |
|
|
26
|
+
| `provider` | [models.TaxProvider](../../sdk/models/tax-provider.md) | :heavy_minus_sign: | N/A |
|
|
25
27
|
| `status` | [models.Status](../../sdk/models/status.md) | :heavy_minus_sign: | N/A |
|
|
26
28
|
| `taxAmount` | *string* | :heavy_minus_sign: | N/A |
|
|
27
29
|
| `taxAssociationId` | *string* | :heavy_minus_sign: | N/A |
|
|
28
30
|
| `taxBehavior` | [models.TaxBehavior](../../sdk/models/tax-behavior.md) | :heavy_minus_sign: | N/A |
|
|
29
31
|
| `taxRate` | [models.TaxRateResponse](../../sdk/models/tax-rate-response.md) | :heavy_minus_sign: | N/A |
|
|
30
|
-
| `taxRateId` | *string* | :heavy_minus_sign: |
|
|
32
|
+
| `taxRateId` | *string* | :heavy_minus_sign: | Null when an external engine calculated the tax: there is no Flexprice rate to point at. |
|
|
33
|
+
| `taxTransactionId` | *string* | :heavy_minus_sign: | TaxTransactionID is the provider transaction recording the filed tax, stamped at commit. |
|
|
34
|
+
| `taxTransactionType` | [models.TaxTransactionType](../../sdk/models/tax-transaction-type.md) | :heavy_minus_sign: | N/A |
|
|
31
35
|
| `taxableAmount` | *string* | :heavy_minus_sign: | N/A |
|
|
32
36
|
| `tenantId` | *string* | :heavy_minus_sign: | N/A |
|
|
33
37
|
| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
```typescript
|
|
6
6
|
import { TaxExemptionReasonCode } from "@flexprice/sdk/sdk/models";
|
|
7
7
|
|
|
8
|
-
let value: TaxExemptionReasonCode = "
|
|
8
|
+
let value: TaxExemptionReasonCode = "not_subject_to_tax";
|
|
9
9
|
|
|
10
10
|
// Open enum: unrecognized values are captured as Unrecognized<string>
|
|
11
11
|
```
|
|
@@ -13,5 +13,5 @@ let value: TaxExemptionReasonCode = "no_tax_configured";
|
|
|
13
13
|
## Values
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
"customer_exempt" | "no_tax_configured" | Unrecognized<string>
|
|
16
|
+
"customer_exempt" | "no_tax_configured" | "reverse_charge" | "not_collecting" | "not_subject_to_tax" | "not_supported" | Unrecognized<string>
|
|
17
17
|
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# TaxJurisdiction
|
|
2
|
+
|
|
3
|
+
## Example Usage
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { TaxJurisdiction } from "@flexprice/sdk/sdk/models";
|
|
7
|
+
|
|
8
|
+
let value: TaxJurisdiction = {};
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Fields
|
|
12
|
+
|
|
13
|
+
| Field | Type | Required | Description |
|
|
14
|
+
| ------------------ | ------------------ | ------------------ | ------------------ |
|
|
15
|
+
| `country` | *string* | :heavy_minus_sign: | N/A |
|
|
16
|
+
| `displayName` | *string* | :heavy_minus_sign: | N/A |
|
|
17
|
+
| `level` | *string* | :heavy_minus_sign: | N/A |
|
|
18
|
+
| `state` | *string* | :heavy_minus_sign: | N/A |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# TaxProvider
|
|
2
|
+
|
|
3
|
+
## Example Usage
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { TaxProvider } from "@flexprice/sdk/sdk/models";
|
|
7
|
+
|
|
8
|
+
let value: TaxProvider = "stripe";
|
|
9
|
+
|
|
10
|
+
// Open enum: unrecognized values are captured as Unrecognized<string>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Values
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
"flexprice" | "stripe" | Unrecognized<string>
|
|
17
|
+
```
|