added customer routes to openapi
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
||||
| `entity_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `entity_data` | [Optional[models.EntityData]](../models/entitydata.md) | :heavy_minus_sign: | N/A |
|
||||
| `options` | List[[models.Options](../models/options.md)] | :heavy_minus_sign: | N/A |
|
||||
| `version` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
| `free_trial` | [OptionalNullable[models.AttachFreeTrial]](../models/attachfreetrial.md) | :heavy_minus_sign: | N/A |
|
||||
|
||||
@@ -8,6 +8,7 @@ OK
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| `customer_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `entity_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `invoice` | [Optional[models.AttachInvoice]](../models/attachinvoice.md) | :heavy_minus_sign: | N/A |
|
||||
| `payment_url` | *Nullable[str]* | :heavy_check_mark: | N/A |
|
||||
| `required_action` | [Optional[models.RequiredAction]](../models/requiredaction.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -3,15 +3,16 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| `feature_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `granted` | *float* | :heavy_check_mark: | N/A |
|
||||
| `remaining` | *float* | :heavy_check_mark: | N/A |
|
||||
| `usage` | *float* | :heavy_check_mark: | N/A |
|
||||
| `unlimited` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `overage_allowed` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `max_purchase` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `next_reset_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `breakdown` | List[[models.Breakdown](../models/breakdown.md)] | :heavy_minus_sign: | N/A |
|
||||
| `rollovers` | List[[models.CustomerRollover](../models/customerrollover.md)] | :heavy_minus_sign: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| `feature_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `feature` | [Optional[models.CustomerFeature]](../models/customerfeature.md) | :heavy_minus_sign: | N/A |
|
||||
| `granted` | *float* | :heavy_check_mark: | N/A |
|
||||
| `remaining` | *float* | :heavy_check_mark: | N/A |
|
||||
| `usage` | *float* | :heavy_check_mark: | N/A |
|
||||
| `unlimited` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `overage_allowed` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `max_purchase` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `next_reset_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `breakdown` | List[[models.Breakdown](../models/breakdown.md)] | :heavy_minus_sign: | N/A |
|
||||
| `rollovers` | List[[models.CustomerRollover](../models/customerrollover.md)] | :heavy_minus_sign: | N/A |
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `plan_id` | *Nullable[str]* | :heavy_check_mark: | N/A |
|
||||
| `included_grant` | *float* | :heavy_check_mark: | N/A |
|
||||
| `prepaid_grant` | *float* | :heavy_check_mark: | N/A |
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *Nullable[str]* | :heavy_check_mark: | Your unique identifier for the customer. |
|
||||
| `name` | *Nullable[str]* | :heavy_check_mark: | The name of the customer. |
|
||||
| `email` | *Nullable[str]* | :heavy_check_mark: | The email address of the customer. |
|
||||
| `created_at` | *float* | :heavy_check_mark: | Timestamp of customer creation in milliseconds since epoch. |
|
||||
| `fingerprint` | *Nullable[str]* | :heavy_check_mark: | A unique identifier (eg. serial number) to de-duplicate customers across devices or browsers. For example: apple device ID. |
|
||||
| `stripe_id` | *Nullable[str]* | :heavy_check_mark: | Stripe customer ID. |
|
||||
| `env` | [models.CustomerEnv](../models/customerenv.md) | :heavy_check_mark: | The environment this customer was created in. |
|
||||
|
||||
10
others/python-sdk/docs/models/customerbalancestype.md
Normal file
10
others/python-sdk/docs/models/customerbalancestype.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# CustomerBalancesType
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| --------------- | --------------- |
|
||||
| `BOOLEAN` | boolean |
|
||||
| `METERED` | metered |
|
||||
| `CREDIT_SYSTEM` | credit_system |
|
||||
9
others/python-sdk/docs/models/customercreditschema.md
Normal file
9
others/python-sdk/docs/models/customercreditschema.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# CustomerCreditSchema
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------- | -------------------- | -------------------- | -------------------- |
|
||||
| `metered_feature_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `credit_cost` | *float* | :heavy_check_mark: | N/A |
|
||||
9
others/python-sdk/docs/models/customerdisplay.md
Normal file
9
others/python-sdk/docs/models/customerdisplay.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# CustomerDisplay
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------- | ----------------------- | ----------------------- | ----------------------- |
|
||||
| `singular` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `plural` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
15
others/python-sdk/docs/models/customerfeature.md
Normal file
15
others/python-sdk/docs/models/customerfeature.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# CustomerFeature
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `name` | *str* | :heavy_check_mark: | N/A |
|
||||
| `type` | [models.CustomerBalancesType](../models/customerbalancestype.md) | :heavy_check_mark: | N/A |
|
||||
| `consumable` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `event_names` | List[*str*] | :heavy_minus_sign: | N/A |
|
||||
| `credit_schema` | List[[models.CustomerCreditSchema](../models/customercreditschema.md)] | :heavy_minus_sign: | N/A |
|
||||
| `display` | [Optional[models.CustomerDisplay]](../models/customerdisplay.md) | :heavy_minus_sign: | N/A |
|
||||
| `archived` | *bool* | :heavy_check_mark: | N/A |
|
||||
@@ -1,4 +1,4 @@
|
||||
# Interval
|
||||
# CustomerIntervalUnion
|
||||
|
||||
|
||||
## Supported Types
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||
| `interval` | [models.Interval](../models/interval.md) | :heavy_check_mark: | N/A |
|
||||
| `interval_count` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
| `resets_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| `interval` | [models.CustomerIntervalUnion](../models/customerintervalunion.md) | :heavy_check_mark: | N/A |
|
||||
| `interval_count` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
| `resets_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
8
others/python-sdk/docs/models/deletecustomerglobals.md
Normal file
8
others/python-sdk/docs/models/deletecustomerglobals.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# DeleteCustomerGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `x_api_version` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
9
others/python-sdk/docs/models/deletecustomerparams.md
Normal file
9
others/python-sdk/docs/models/deletecustomerparams.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# DeleteCustomerParams
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| `customer_id` | *str* | :heavy_check_mark: | ID of the customer to delete |
|
||||
| `delete_in_stripe` | *Optional[bool]* | :heavy_minus_sign: | Whether to also delete the customer in Stripe |
|
||||
10
others/python-sdk/docs/models/deletecustomerresponse.md
Normal file
10
others/python-sdk/docs/models/deletecustomerresponse.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# DeleteCustomerResponse
|
||||
|
||||
OK
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `success` | *bool* | :heavy_check_mark: | N/A |
|
||||
@@ -5,8 +5,9 @@
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier for this discount |
|
||||
| `name` | *str* | :heavy_check_mark: | The name of the discount or coupon |
|
||||
| `type` | [models.Type](../models/type.md) | :heavy_check_mark: | The type of reward |
|
||||
| `type` | [models.RewardsType](../models/rewardstype.md) | :heavy_check_mark: | The type of reward |
|
||||
| `discount_value` | *float* | :heavy_check_mark: | The discount value (percentage or fixed amount) |
|
||||
| `duration_type` | [models.CustomerDurationType](../models/customerdurationtype.md) | :heavy_check_mark: | How long the discount lasts |
|
||||
| `duration_value` | *OptionalNullable[float]* | :heavy_minus_sign: | Number of billing periods the discount applies for repeating durations |
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
|
||||
| `autumn_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `id` | *Nullable[str]* | :heavy_check_mark: | The unique identifier of the entity |
|
||||
| `name` | *Nullable[str]* | :heavy_check_mark: | The name of the entity |
|
||||
| `customer_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The customer ID this entity belongs to |
|
||||
| `feature_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The feature ID this entity belongs to |
|
||||
| `created_at` | *float* | :heavy_check_mark: | Unix timestamp when the entity was created |
|
||||
| `env` | [models.EntityEnv](../models/entityenv.md) | :heavy_check_mark: | The environment (sandbox/live) |
|
||||
9
others/python-sdk/docs/models/entitydata.md
Normal file
9
others/python-sdk/docs/models/entitydata.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# EntityData
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
|
||||
| `feature_id` | *str* | :heavy_check_mark: | The feature ID that this entity is associated with |
|
||||
| `name` | *Optional[str]* | :heavy_minus_sign: | Name of the entity |
|
||||
@@ -0,0 +1,8 @@
|
||||
# GetOrCreateCustomerGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `x_api_version` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
@@ -10,4 +10,5 @@
|
||||
| `status` | *str* | :heavy_check_mark: | The status of the invoice |
|
||||
| `total` | *float* | :heavy_check_mark: | The total amount of the invoice |
|
||||
| `currency` | *str* | :heavy_check_mark: | The currency code for the invoice |
|
||||
| `created_at` | *float* | :heavy_check_mark: | Timestamp when the invoice was created |
|
||||
| `hosted_invoice_url` | *OptionalNullable[str]* | :heavy_minus_sign: | URL to the Stripe-hosted invoice page |
|
||||
@@ -6,9 +6,11 @@
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
||||
| `feature_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `feature` | [Optional[models.PlanFeature]](../models/planfeature.md) | :heavy_minus_sign: | N/A |
|
||||
| `included` | *float* | :heavy_check_mark: | N/A |
|
||||
| `unlimited` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `reset` | [Nullable[models.PlanReset]](../models/planreset.md) | :heavy_check_mark: | N/A |
|
||||
| `price` | [Nullable[models.ItemPrice]](../models/itemprice.md) | :heavy_check_mark: | N/A |
|
||||
| `display` | [Optional[models.ItemDisplay]](../models/itemdisplay.md) | :heavy_minus_sign: | N/A |
|
||||
| `rollover` | [Optional[models.PlanRollover]](../models/planrollover.md) | :heavy_minus_sign: | N/A |
|
||||
| `proration` | [Optional[models.Proration]](../models/proration.md) | :heavy_minus_sign: | N/A |
|
||||
9
others/python-sdk/docs/models/itemdisplay.md
Normal file
9
others/python-sdk/docs/models/itemdisplay.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# ItemDisplay
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `primary_text` | *str* | :heavy_check_mark: | N/A |
|
||||
| `secondary_text` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
9
others/python-sdk/docs/models/itemfeaturedisplay.md
Normal file
9
others/python-sdk/docs/models/itemfeaturedisplay.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# ItemFeatureDisplay
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
|
||||
| `singular` | *str* | :heavy_check_mark: | The singular display name for the feature. |
|
||||
| `plural` | *str* | :heavy_check_mark: | The plural display name for the feature. |
|
||||
18
others/python-sdk/docs/models/listcustomersbalances.md
Normal file
18
others/python-sdk/docs/models/listcustomersbalances.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# ListCustomersBalances
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
||||
| `feature_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `feature` | [Optional[models.ListCustomersFeature]](../models/listcustomersfeature.md) | :heavy_minus_sign: | N/A |
|
||||
| `granted` | *float* | :heavy_check_mark: | N/A |
|
||||
| `remaining` | *float* | :heavy_check_mark: | N/A |
|
||||
| `usage` | *float* | :heavy_check_mark: | N/A |
|
||||
| `unlimited` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `overage_allowed` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `max_purchase` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `next_reset_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `breakdown` | List[[models.ListCustomersBreakdown](../models/listcustomersbreakdown.md)] | :heavy_minus_sign: | N/A |
|
||||
| `rollovers` | List[[models.ListCustomersRollover](../models/listcustomersrollover.md)] | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListCustomersBillingMethod
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------- | ------------- |
|
||||
| `PREPAID` | prepaid |
|
||||
| `USAGE_BASED` | usage_based |
|
||||
17
others/python-sdk/docs/models/listcustomersbreakdown.md
Normal file
17
others/python-sdk/docs/models/listcustomersbreakdown.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# ListCustomersBreakdown
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `plan_id` | *Nullable[str]* | :heavy_check_mark: | N/A |
|
||||
| `included_grant` | *float* | :heavy_check_mark: | N/A |
|
||||
| `prepaid_grant` | *float* | :heavy_check_mark: | N/A |
|
||||
| `remaining` | *float* | :heavy_check_mark: | N/A |
|
||||
| `usage` | *float* | :heavy_check_mark: | N/A |
|
||||
| `unlimited` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `reset` | [Nullable[models.ListCustomersReset]](../models/listcustomersreset.md) | :heavy_check_mark: | N/A |
|
||||
| `price` | [Nullable[models.ListCustomersPrice]](../models/listcustomersprice.md) | :heavy_check_mark: | N/A |
|
||||
| `expires_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListCustomersCreditSchema
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------- | -------------------- | -------------------- | -------------------- |
|
||||
| `metered_feature_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `credit_cost` | *float* | :heavy_check_mark: | N/A |
|
||||
9
others/python-sdk/docs/models/listcustomersdisplay.md
Normal file
9
others/python-sdk/docs/models/listcustomersdisplay.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# ListCustomersDisplay
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------- | ----------------------- | ----------------------- | ----------------------- |
|
||||
| `singular` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `plural` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
11
others/python-sdk/docs/models/listcustomersenv.md
Normal file
11
others/python-sdk/docs/models/listcustomersenv.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# ListCustomersEnv
|
||||
|
||||
The environment this customer was created in.
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `SANDBOX` | sandbox |
|
||||
| `LIVE` | live |
|
||||
15
others/python-sdk/docs/models/listcustomersfeature.md
Normal file
15
others/python-sdk/docs/models/listcustomersfeature.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# ListCustomersFeature
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `name` | *str* | :heavy_check_mark: | N/A |
|
||||
| `type` | [models.ListCustomersType](../models/listcustomerstype.md) | :heavy_check_mark: | N/A |
|
||||
| `consumable` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `event_names` | List[*str*] | :heavy_minus_sign: | N/A |
|
||||
| `credit_schema` | List[[models.ListCustomersCreditSchema](../models/listcustomerscreditschema.md)] | :heavy_minus_sign: | N/A |
|
||||
| `display` | [Optional[models.ListCustomersDisplay]](../models/listcustomersdisplay.md) | :heavy_minus_sign: | N/A |
|
||||
| `archived` | *bool* | :heavy_check_mark: | N/A |
|
||||
@@ -1,4 +1,4 @@
|
||||
# GetOrCreateGlobals
|
||||
# ListCustomersGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
16
others/python-sdk/docs/models/listcustomersintervalenum.md
Normal file
16
others/python-sdk/docs/models/listcustomersintervalenum.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# ListCustomersIntervalEnum
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------- | ------------- |
|
||||
| `ONE_OFF` | one_off |
|
||||
| `MINUTE` | minute |
|
||||
| `HOUR` | hour |
|
||||
| `DAY` | day |
|
||||
| `WEEK` | week |
|
||||
| `MONTH` | month |
|
||||
| `QUARTER` | quarter |
|
||||
| `SEMI_ANNUAL` | semi_annual |
|
||||
| `YEAR` | year |
|
||||
17
others/python-sdk/docs/models/listcustomersintervalunion.md
Normal file
17
others/python-sdk/docs/models/listcustomersintervalunion.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# ListCustomersIntervalUnion
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `models.ListCustomersIntervalEnum`
|
||||
|
||||
```python
|
||||
value: models.ListCustomersIntervalEnum = /* values here */
|
||||
```
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
12
others/python-sdk/docs/models/listcustomersparams.md
Normal file
12
others/python-sdk/docs/models/listcustomersparams.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# ListCustomersParams
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of items to skip |
|
||||
| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of items to return. Default 10, max 1000. |
|
||||
| `plans` | List[[models.ListCustomersPlan](../models/listcustomersplan.md)] | :heavy_minus_sign: | Filter by plan ID and version. Returns customers with active subscriptions to this plan. |
|
||||
| `subscription_status` | [Optional[models.SubscriptionStatus]](../models/subscriptionstatus.md) | :heavy_minus_sign: | Filter by customer product status. Defaults to active and scheduled |
|
||||
| `search` | *Optional[str]* | :heavy_minus_sign: | Search customers by id, name, or email |
|
||||
9
others/python-sdk/docs/models/listcustomersplan.md
Normal file
9
others/python-sdk/docs/models/listcustomersplan.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# ListCustomersPlan
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `versions` | List[*float*] | :heavy_minus_sign: | N/A |
|
||||
12
others/python-sdk/docs/models/listcustomersprice.md
Normal file
12
others/python-sdk/docs/models/listcustomersprice.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# ListCustomersPrice
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `amount` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
| `tiers` | List[[models.ListCustomersTier](../models/listcustomerstier.md)] | :heavy_minus_sign: | N/A |
|
||||
| `billing_units` | *float* | :heavy_check_mark: | N/A |
|
||||
| `billing_method` | [models.ListCustomersBillingMethod](../models/listcustomersbillingmethod.md) | :heavy_check_mark: | N/A |
|
||||
| `max_purchase` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
12
others/python-sdk/docs/models/listcustomerspurchase.md
Normal file
12
others/python-sdk/docs/models/listcustomerspurchase.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# ListCustomersPurchase
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
|
||||
| `plan` | [Optional[models.Plan]](../models/plan.md) | :heavy_minus_sign: | N/A |
|
||||
| `plan_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `expires_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `started_at` | *float* | :heavy_check_mark: | N/A |
|
||||
| `quantity` | *float* | :heavy_check_mark: | N/A |
|
||||
10
others/python-sdk/docs/models/listcustomersreset.md
Normal file
10
others/python-sdk/docs/models/listcustomersreset.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# ListCustomersReset
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `interval` | [models.ListCustomersIntervalUnion](../models/listcustomersintervalunion.md) | :heavy_check_mark: | N/A |
|
||||
| `interval_count` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
| `resets_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
14
others/python-sdk/docs/models/listcustomersresponse.md
Normal file
14
others/python-sdk/docs/models/listcustomersresponse.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# ListCustomersResponse
|
||||
|
||||
OK
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
|
||||
| `list` | List[[models.ListT](../models/listt.md)] | :heavy_check_mark: | Array of items for current page |
|
||||
| `has_more` | *bool* | :heavy_check_mark: | Whether more results exist after this page |
|
||||
| `offset` | *float* | :heavy_check_mark: | Current offset position |
|
||||
| `limit` | *float* | :heavy_check_mark: | Limit passed in the request |
|
||||
| `total` | *float* | :heavy_check_mark: | Total number of items returned in the current page |
|
||||
9
others/python-sdk/docs/models/listcustomersrollover.md
Normal file
9
others/python-sdk/docs/models/listcustomersrollover.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# ListCustomersRollover
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `balance` | *float* | :heavy_check_mark: | N/A |
|
||||
| `expires_at` | *float* | :heavy_check_mark: | N/A |
|
||||
10
others/python-sdk/docs/models/listcustomersstatus.md
Normal file
10
others/python-sdk/docs/models/listcustomersstatus.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# ListCustomersStatus
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ----------- | ----------- |
|
||||
| `ACTIVE` | active |
|
||||
| `SCHEDULED` | scheduled |
|
||||
| `EXPIRED` | expired |
|
||||
20
others/python-sdk/docs/models/listcustomerssubscription.md
Normal file
20
others/python-sdk/docs/models/listcustomerssubscription.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# ListCustomersSubscription
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| `plan` | [Optional[models.Plan]](../models/plan.md) | :heavy_minus_sign: | N/A |
|
||||
| `plan_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `auto_enable` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `add_on` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `status` | [models.ListCustomersStatus](../models/listcustomersstatus.md) | :heavy_check_mark: | N/A |
|
||||
| `past_due` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `canceled_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `expires_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `trial_ends_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `started_at` | *float* | :heavy_check_mark: | N/A |
|
||||
| `current_period_start` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `current_period_end` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `quantity` | *float* | :heavy_check_mark: | N/A |
|
||||
9
others/python-sdk/docs/models/listcustomerstier.md
Normal file
9
others/python-sdk/docs/models/listcustomerstier.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# ListCustomersTier
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `to` | *Optional[Any]* | :heavy_minus_sign: | N/A |
|
||||
| `amount` | *float* | :heavy_check_mark: | N/A |
|
||||
10
others/python-sdk/docs/models/listcustomerstype.md
Normal file
10
others/python-sdk/docs/models/listcustomerstype.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# ListCustomersType
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| --------------- | --------------- |
|
||||
| `BOOLEAN` | boolean |
|
||||
| `METERED` | metered |
|
||||
| `CREDIT_SYSTEM` | credit_system |
|
||||
19
others/python-sdk/docs/models/listt.md
Normal file
19
others/python-sdk/docs/models/listt.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# ListT
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *Nullable[str]* | :heavy_check_mark: | Your unique identifier for the customer. |
|
||||
| `name` | *Nullable[str]* | :heavy_check_mark: | The name of the customer. |
|
||||
| `email` | *Nullable[str]* | :heavy_check_mark: | The email address of the customer. |
|
||||
| `created_at` | *float* | :heavy_check_mark: | Timestamp of customer creation in milliseconds since epoch. |
|
||||
| `fingerprint` | *Nullable[str]* | :heavy_check_mark: | A unique identifier (eg. serial number) to de-duplicate customers across devices or browsers. For example: apple device ID. |
|
||||
| `stripe_id` | *Nullable[str]* | :heavy_check_mark: | Stripe customer ID. |
|
||||
| `env` | [models.ListCustomersEnv](../models/listcustomersenv.md) | :heavy_check_mark: | The environment this customer was created in. |
|
||||
| `metadata` | Dict[str, *Any*] | :heavy_check_mark: | The metadata for the customer. |
|
||||
| `send_email_receipts` | *bool* | :heavy_check_mark: | Whether to send email receipts to the customer. |
|
||||
| `subscriptions` | List[[models.ListCustomersSubscription](../models/listcustomerssubscription.md)] | :heavy_check_mark: | N/A |
|
||||
| `purchases` | List[[models.ListCustomersPurchase](../models/listcustomerspurchase.md)] | :heavy_check_mark: | N/A |
|
||||
| `balances` | Dict[str, [models.ListCustomersBalances](../models/listcustomersbalances.md)] | :heavy_check_mark: | N/A |
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
||||
| `id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `name` | *str* | :heavy_check_mark: | N/A |
|
||||
| `description` | *Nullable[str]* | :heavy_check_mark: | N/A |
|
||||
| `group` | *Nullable[str]* | :heavy_check_mark: | N/A |
|
||||
@@ -14,6 +15,7 @@
|
||||
| `price` | [Nullable[models.PlanPrice]](../models/planprice.md) | :heavy_check_mark: | N/A |
|
||||
| `items` | List[[models.Item](../models/item.md)] | :heavy_check_mark: | N/A |
|
||||
| `free_trial` | [Optional[models.FreeTrial]](../models/freetrial.md) | :heavy_minus_sign: | N/A |
|
||||
| `created_at` | *float* | :heavy_check_mark: | N/A |
|
||||
| `env` | [models.PlanEnv](../models/planenv.md) | :heavy_check_mark: | N/A |
|
||||
| `archived` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `base_variant_id` | *Nullable[str]* | :heavy_check_mark: | N/A |
|
||||
|
||||
9
others/python-sdk/docs/models/plancreditschema.md
Normal file
9
others/python-sdk/docs/models/plancreditschema.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# PlanCreditSchema
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `metered_feature_id` | *str* | :heavy_check_mark: | The ID of the metered feature (should be a single_use feature). |
|
||||
| `credit_cost` | *float* | :heavy_check_mark: | The credit cost of the metered feature. |
|
||||
13
others/python-sdk/docs/models/planfeature.md
Normal file
13
others/python-sdk/docs/models/planfeature.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# PlanFeature
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
||||
| `id` | *str* | :heavy_check_mark: | The ID of the feature, used to refer to it in other API calls like /track or /check. |
|
||||
| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the feature. |
|
||||
| `type` | [models.PlanType](../models/plantype.md) | :heavy_check_mark: | The type of the feature |
|
||||
| `display` | [OptionalNullable[models.ItemFeatureDisplay]](../models/itemfeaturedisplay.md) | :heavy_minus_sign: | Singular and plural display names for the feature. |
|
||||
| `credit_schema` | List[[models.PlanCreditSchema](../models/plancreditschema.md)] | :heavy_minus_sign: | Credit cost schema for credit system features. |
|
||||
| `archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether or not the feature is archived. |
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
|
||||
| `amount` | *float* | :heavy_check_mark: | N/A |
|
||||
| `interval` | [models.PriceInterval](../models/priceinterval.md) | :heavy_check_mark: | N/A |
|
||||
| `interval_count` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
||||
| `amount` | *float* | :heavy_check_mark: | N/A |
|
||||
| `interval` | [models.PriceInterval](../models/priceinterval.md) | :heavy_check_mark: | N/A |
|
||||
| `interval_count` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
| `display` | [Optional[models.PriceDisplay]](../models/pricedisplay.md) | :heavy_minus_sign: | N/A |
|
||||
14
others/python-sdk/docs/models/plantype.md
Normal file
14
others/python-sdk/docs/models/plantype.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# PlanType
|
||||
|
||||
The type of the feature
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ---------------- | ---------------- |
|
||||
| `STATIC` | static |
|
||||
| `BOOLEAN` | boolean |
|
||||
| `SINGLE_USE` | single_use |
|
||||
| `CONTINUOUS_USE` | continuous_use |
|
||||
| `CREDIT_SYSTEM` | credit_system |
|
||||
9
others/python-sdk/docs/models/pricedisplay.md
Normal file
9
others/python-sdk/docs/models/pricedisplay.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# PriceDisplay
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `primary_text` | *str* | :heavy_check_mark: | N/A |
|
||||
| `secondary_text` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
@@ -7,4 +7,5 @@
|
||||
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
|
||||
| `program_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `customer` | [models.ReferralCustomer](../models/referralcustomer.md) | :heavy_check_mark: | N/A |
|
||||
| `reward_applied` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `reward_applied` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `created_at` | *float* | :heavy_check_mark: | N/A |
|
||||
@@ -5,5 +5,6 @@
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------- | ----------------------- | ----------------------- | ----------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
@@ -1,4 +1,4 @@
|
||||
# Type
|
||||
# RewardsType
|
||||
|
||||
The type of reward
|
||||
|
||||
11
others/python-sdk/docs/models/subscriptionstatus.md
Normal file
11
others/python-sdk/docs/models/subscriptionstatus.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# SubscriptionStatus
|
||||
|
||||
Filter by customer product status. Defaults to active and scheduled
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ----------- | ----------- |
|
||||
| `ACTIVE` | active |
|
||||
| `SCHEDULED` | scheduled |
|
||||
18
others/python-sdk/docs/models/updatecustomerbalances.md
Normal file
18
others/python-sdk/docs/models/updatecustomerbalances.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# UpdateCustomerBalances
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `feature_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `feature` | [Optional[models.UpdateCustomerFeature]](../models/updatecustomerfeature.md) | :heavy_minus_sign: | N/A |
|
||||
| `granted` | *float* | :heavy_check_mark: | N/A |
|
||||
| `remaining` | *float* | :heavy_check_mark: | N/A |
|
||||
| `usage` | *float* | :heavy_check_mark: | N/A |
|
||||
| `unlimited` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `overage_allowed` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `max_purchase` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `next_reset_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `breakdown` | List[[models.UpdateCustomerBreakdown](../models/updatecustomerbreakdown.md)] | :heavy_minus_sign: | N/A |
|
||||
| `rollovers` | List[[models.UpdateCustomerRollover](../models/updatecustomerrollover.md)] | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,9 @@
|
||||
# UpdateCustomerBillingMethod
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------- | ------------- |
|
||||
| `PREPAID` | prepaid |
|
||||
| `USAGE_BASED` | usage_based |
|
||||
17
others/python-sdk/docs/models/updatecustomerbreakdown.md
Normal file
17
others/python-sdk/docs/models/updatecustomerbreakdown.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# UpdateCustomerBreakdown
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
||||
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `plan_id` | *Nullable[str]* | :heavy_check_mark: | N/A |
|
||||
| `included_grant` | *float* | :heavy_check_mark: | N/A |
|
||||
| `prepaid_grant` | *float* | :heavy_check_mark: | N/A |
|
||||
| `remaining` | *float* | :heavy_check_mark: | N/A |
|
||||
| `usage` | *float* | :heavy_check_mark: | N/A |
|
||||
| `unlimited` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `reset` | [Nullable[models.UpdateCustomerReset]](../models/updatecustomerreset.md) | :heavy_check_mark: | N/A |
|
||||
| `price` | [Nullable[models.UpdateCustomerPrice]](../models/updatecustomerprice.md) | :heavy_check_mark: | N/A |
|
||||
| `expires_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,9 @@
|
||||
# UpdateCustomerCreditSchema
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------- | -------------------- | -------------------- | -------------------- |
|
||||
| `metered_feature_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `credit_cost` | *float* | :heavy_check_mark: | N/A |
|
||||
9
others/python-sdk/docs/models/updatecustomerdisplay.md
Normal file
9
others/python-sdk/docs/models/updatecustomerdisplay.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# UpdateCustomerDisplay
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------- | ----------------------- | ----------------------- | ----------------------- |
|
||||
| `singular` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `plural` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
11
others/python-sdk/docs/models/updatecustomerenv.md
Normal file
11
others/python-sdk/docs/models/updatecustomerenv.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# UpdateCustomerEnv
|
||||
|
||||
The environment this customer was created in.
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `SANDBOX` | sandbox |
|
||||
| `LIVE` | live |
|
||||
15
others/python-sdk/docs/models/updatecustomerfeature.md
Normal file
15
others/python-sdk/docs/models/updatecustomerfeature.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# UpdateCustomerFeature
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `name` | *str* | :heavy_check_mark: | N/A |
|
||||
| `type` | [models.UpdateCustomerType](../models/updatecustomertype.md) | :heavy_check_mark: | N/A |
|
||||
| `consumable` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `event_names` | List[*str*] | :heavy_minus_sign: | N/A |
|
||||
| `credit_schema` | List[[models.UpdateCustomerCreditSchema](../models/updatecustomercreditschema.md)] | :heavy_minus_sign: | N/A |
|
||||
| `display` | [Optional[models.UpdateCustomerDisplay]](../models/updatecustomerdisplay.md) | :heavy_minus_sign: | N/A |
|
||||
| `archived` | *bool* | :heavy_check_mark: | N/A |
|
||||
8
others/python-sdk/docs/models/updatecustomerglobals.md
Normal file
8
others/python-sdk/docs/models/updatecustomerglobals.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# UpdateCustomerGlobals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `x_api_version` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
16
others/python-sdk/docs/models/updatecustomerintervalenum.md
Normal file
16
others/python-sdk/docs/models/updatecustomerintervalenum.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# UpdateCustomerIntervalEnum
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------- | ------------- |
|
||||
| `ONE_OFF` | one_off |
|
||||
| `MINUTE` | minute |
|
||||
| `HOUR` | hour |
|
||||
| `DAY` | day |
|
||||
| `WEEK` | week |
|
||||
| `MONTH` | month |
|
||||
| `QUARTER` | quarter |
|
||||
| `SEMI_ANNUAL` | semi_annual |
|
||||
| `YEAR` | year |
|
||||
17
others/python-sdk/docs/models/updatecustomerintervalunion.md
Normal file
17
others/python-sdk/docs/models/updatecustomerintervalunion.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# UpdateCustomerIntervalUnion
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `models.UpdateCustomerIntervalEnum`
|
||||
|
||||
```python
|
||||
value: models.UpdateCustomerIntervalEnum = /* values here */
|
||||
```
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
15
others/python-sdk/docs/models/updatecustomerparams.md
Normal file
15
others/python-sdk/docs/models/updatecustomerparams.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# UpdateCustomerParams
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
|
||||
| `customer_id` | *str* | :heavy_check_mark: | ID of the customer to update |
|
||||
| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Customer's name |
|
||||
| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | Customer's email address |
|
||||
| `fingerprint` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier (eg, serial number) to detect duplicate customers and prevent free trial abuse |
|
||||
| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Additional metadata for the customer |
|
||||
| `stripe_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Stripe customer ID if you already have one |
|
||||
| `send_email_receipts` | *Optional[bool]* | :heavy_minus_sign: | Whether to send email receipts to this customer |
|
||||
| `new_customer_id` | *Optional[str]* | :heavy_minus_sign: | Your unique identifier for the customer |
|
||||
12
others/python-sdk/docs/models/updatecustomerprice.md
Normal file
12
others/python-sdk/docs/models/updatecustomerprice.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# UpdateCustomerPrice
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
||||
| `amount` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
| `tiers` | List[[models.UpdateCustomerTier](../models/updatecustomertier.md)] | :heavy_minus_sign: | N/A |
|
||||
| `billing_units` | *float* | :heavy_check_mark: | N/A |
|
||||
| `billing_method` | [models.UpdateCustomerBillingMethod](../models/updatecustomerbillingmethod.md) | :heavy_check_mark: | N/A |
|
||||
| `max_purchase` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
12
others/python-sdk/docs/models/updatecustomerpurchase.md
Normal file
12
others/python-sdk/docs/models/updatecustomerpurchase.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# UpdateCustomerPurchase
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
|
||||
| `plan` | [Optional[models.Plan]](../models/plan.md) | :heavy_minus_sign: | N/A |
|
||||
| `plan_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `expires_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `started_at` | *float* | :heavy_check_mark: | N/A |
|
||||
| `quantity` | *float* | :heavy_check_mark: | N/A |
|
||||
10
others/python-sdk/docs/models/updatecustomerreset.md
Normal file
10
others/python-sdk/docs/models/updatecustomerreset.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# UpdateCustomerReset
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
||||
| `interval` | [models.UpdateCustomerIntervalUnion](../models/updatecustomerintervalunion.md) | :heavy_check_mark: | N/A |
|
||||
| `interval_count` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
| `resets_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
21
others/python-sdk/docs/models/updatecustomerresponse.md
Normal file
21
others/python-sdk/docs/models/updatecustomerresponse.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# UpdateCustomerResponse
|
||||
|
||||
OK
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *Nullable[str]* | :heavy_check_mark: | Your unique identifier for the customer. |
|
||||
| `name` | *Nullable[str]* | :heavy_check_mark: | The name of the customer. |
|
||||
| `email` | *Nullable[str]* | :heavy_check_mark: | The email address of the customer. |
|
||||
| `created_at` | *float* | :heavy_check_mark: | Timestamp of customer creation in milliseconds since epoch. |
|
||||
| `fingerprint` | *Nullable[str]* | :heavy_check_mark: | A unique identifier (eg. serial number) to de-duplicate customers across devices or browsers. For example: apple device ID. |
|
||||
| `stripe_id` | *Nullable[str]* | :heavy_check_mark: | Stripe customer ID. |
|
||||
| `env` | [models.UpdateCustomerEnv](../models/updatecustomerenv.md) | :heavy_check_mark: | The environment this customer was created in. |
|
||||
| `metadata` | Dict[str, *Any*] | :heavy_check_mark: | The metadata for the customer. |
|
||||
| `send_email_receipts` | *bool* | :heavy_check_mark: | Whether to send email receipts to the customer. |
|
||||
| `subscriptions` | List[[models.UpdateCustomerSubscription](../models/updatecustomersubscription.md)] | :heavy_check_mark: | N/A |
|
||||
| `purchases` | List[[models.UpdateCustomerPurchase](../models/updatecustomerpurchase.md)] | :heavy_check_mark: | N/A |
|
||||
| `balances` | Dict[str, [models.UpdateCustomerBalances](../models/updatecustomerbalances.md)] | :heavy_check_mark: | N/A |
|
||||
9
others/python-sdk/docs/models/updatecustomerrollover.md
Normal file
9
others/python-sdk/docs/models/updatecustomerrollover.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# UpdateCustomerRollover
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `balance` | *float* | :heavy_check_mark: | N/A |
|
||||
| `expires_at` | *float* | :heavy_check_mark: | N/A |
|
||||
10
others/python-sdk/docs/models/updatecustomerstatus.md
Normal file
10
others/python-sdk/docs/models/updatecustomerstatus.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# UpdateCustomerStatus
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ----------- | ----------- |
|
||||
| `ACTIVE` | active |
|
||||
| `SCHEDULED` | scheduled |
|
||||
| `EXPIRED` | expired |
|
||||
20
others/python-sdk/docs/models/updatecustomersubscription.md
Normal file
20
others/python-sdk/docs/models/updatecustomersubscription.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# UpdateCustomerSubscription
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| `plan` | [Optional[models.Plan]](../models/plan.md) | :heavy_minus_sign: | N/A |
|
||||
| `plan_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `auto_enable` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `add_on` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `status` | [models.UpdateCustomerStatus](../models/updatecustomerstatus.md) | :heavy_check_mark: | N/A |
|
||||
| `past_due` | *bool* | :heavy_check_mark: | N/A |
|
||||
| `canceled_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `expires_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `trial_ends_at` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `started_at` | *float* | :heavy_check_mark: | N/A |
|
||||
| `current_period_start` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `current_period_end` | *Nullable[float]* | :heavy_check_mark: | N/A |
|
||||
| `quantity` | *float* | :heavy_check_mark: | N/A |
|
||||
9
others/python-sdk/docs/models/updatecustomertier.md
Normal file
9
others/python-sdk/docs/models/updatecustomertier.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# UpdateCustomerTier
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
|
||||
| `to` | [models.UpdateCustomerTo](../models/updatecustomerto.md) | :heavy_check_mark: | N/A |
|
||||
| `amount` | *float* | :heavy_check_mark: | N/A |
|
||||
17
others/python-sdk/docs/models/updatecustomerto.md
Normal file
17
others/python-sdk/docs/models/updatecustomerto.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# UpdateCustomerTo
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `float`
|
||||
|
||||
```python
|
||||
value: float = /* values here */
|
||||
```
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
10
others/python-sdk/docs/models/updatecustomertype.md
Normal file
10
others/python-sdk/docs/models/updatecustomertype.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# UpdateCustomerType
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| --------------- | --------------- |
|
||||
| `BOOLEAN` | boolean |
|
||||
| `METERED` | metered |
|
||||
| `CREDIT_SYSTEM` | credit_system |
|
||||
@@ -32,6 +32,8 @@ with Autumn(
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||
| `product_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `entity_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `entity_data` | [Optional[models.EntityData]](../../models/entitydata.md) | :heavy_minus_sign: | N/A |
|
||||
| `options` | List[[models.Options](../../models/options.md)] | :heavy_minus_sign: | N/A |
|
||||
| `version` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
| `free_trial` | [OptionalNullable[models.AttachFreeTrial]](../../models/attachfreetrial.md) | :heavy_minus_sign: | N/A |
|
||||
|
||||
@@ -5,42 +5,17 @@
|
||||
### Available Operations
|
||||
|
||||
* [get_or_create](#get_or_create) - Creates a customer if they do not exist, or returns the existing customer by your external customer ID.
|
||||
|
||||
Use this as the primary entrypoint before billing operations so the customer record is always present and up to date.
|
||||
|
||||
@example
|
||||
```typescript
|
||||
// Create or fetch a customer by external ID
|
||||
const response = await client.getOrCreate({
|
||||
|
||||
|
||||
"id": "cus_123",
|
||||
"name": "John Doe",
|
||||
"email": "john@example.com"
|
||||
});
|
||||
```
|
||||
* [list](#list) - Lists customers with pagination and optional filters.
|
||||
* [update](#update) - Updates an existing customer by ID.
|
||||
* [delete](#delete) - Deletes a customer by ID.
|
||||
|
||||
## get_or_create
|
||||
|
||||
Creates a customer if they do not exist, or returns the existing customer by your external customer ID.
|
||||
|
||||
Use this as the primary entrypoint before billing operations so the customer record is always present and up to date.
|
||||
|
||||
@example
|
||||
```typescript
|
||||
// Create or fetch a customer by external ID
|
||||
const response = await client.getOrCreate({
|
||||
|
||||
|
||||
"id": "cus_123",
|
||||
"name": "John Doe",
|
||||
"email": "john@example.com"
|
||||
});
|
||||
```
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getOrCreate" method="post" path="/v1/customers.getOrCreate" -->
|
||||
<!-- UsageSnippet language="python" operationID="getOrCreateCustomer" method="post" path="/v1/customers.getOrCreate" -->
|
||||
```python
|
||||
from autumn_sdk import Autumn
|
||||
|
||||
@@ -79,6 +54,134 @@ with Autumn(
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------- | ------------------------- | ------------------------- |
|
||||
| errors.AutumnDefaultError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## list
|
||||
|
||||
Lists customers with pagination and optional filters.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="listCustomers" method="post" path="/v1/customers.list" -->
|
||||
```python
|
||||
from autumn_sdk import Autumn
|
||||
|
||||
|
||||
with Autumn(
|
||||
x_api_version="2.1",
|
||||
secret_key="<YOUR_BEARER_TOKEN_HERE>",
|
||||
) as autumn:
|
||||
|
||||
res = autumn.customers.list(request={})
|
||||
|
||||
# Handle response
|
||||
print(res)
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `request` | [models.ListCustomersParams](../../models/listcustomersparams.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
**[models.ListCustomersResponse](../../models/listcustomersresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------- | ------------------------- | ------------------------- |
|
||||
| errors.AutumnDefaultError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## update
|
||||
|
||||
Updates an existing customer by ID.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="updateCustomer" method="post" path="/v1/customers.update" -->
|
||||
```python
|
||||
from autumn_sdk import Autumn
|
||||
|
||||
|
||||
with Autumn(
|
||||
x_api_version="2.1",
|
||||
secret_key="<YOUR_BEARER_TOKEN_HERE>",
|
||||
) as autumn:
|
||||
|
||||
res = autumn.customers.update(customer_id="cus_123", name="Jane Doe", email="jane@example.com")
|
||||
|
||||
# Handle response
|
||||
print(res)
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
|
||||
| `customer_id` | *str* | :heavy_check_mark: | ID of the customer to update |
|
||||
| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Customer's name |
|
||||
| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | Customer's email address |
|
||||
| `fingerprint` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier (eg, serial number) to detect duplicate customers and prevent free trial abuse |
|
||||
| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Additional metadata for the customer |
|
||||
| `stripe_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Stripe customer ID if you already have one |
|
||||
| `send_email_receipts` | *Optional[bool]* | :heavy_minus_sign: | Whether to send email receipts to this customer |
|
||||
| `new_customer_id` | *Optional[str]* | :heavy_minus_sign: | Your unique identifier for the customer |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
**[models.UpdateCustomerResponse](../../models/updatecustomerresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------- | ------------------------- | ------------------------- |
|
||||
| errors.AutumnDefaultError | 4XX, 5XX | \*/\* |
|
||||
|
||||
## delete
|
||||
|
||||
Deletes a customer by ID.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="deleteCustomer" method="post" path="/v1/customers.delete" -->
|
||||
```python
|
||||
from autumn_sdk import Autumn
|
||||
|
||||
|
||||
with Autumn(
|
||||
x_api_version="2.1",
|
||||
secret_key="<YOUR_BEARER_TOKEN_HERE>",
|
||||
) as autumn:
|
||||
|
||||
res = autumn.customers.delete(customer_id="cus_123", delete_in_stripe=False)
|
||||
|
||||
# Handle response
|
||||
print(res)
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `customer_id` | *str* | :heavy_check_mark: | ID of the customer to delete |
|
||||
| `delete_in_stripe` | *Optional[bool]* | :heavy_minus_sign: | Whether to also delete the customer in Stripe |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
**[models.DeleteCustomerResponse](../../models/deletecustomerresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------------- | ------------------------- | ------------------------- |
|
||||
| errors.AutumnDefaultError | 4XX, 5XX | \*/\* |
|
||||
Reference in New Issue
Block a user