Skip to content

Commit 602ac1f

Browse files
speakeasybotfrankie567
authored andcommittedDec 20, 2024·
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.456.1
1 parent 648b56b commit 602ac1f

22 files changed

+431
-23
lines changed
 

‎.speakeasy/gen.lock

+22-7
Large diffs are not rendered by default.

‎.speakeasy/gen.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ generation:
1616
oAuth2ClientCredentialsEnabled: true
1717
oAuth2PasswordEnabled: false
1818
python:
19-
version: 0.11.0
19+
version: 0.11.1
2020
additionalDependencies:
2121
dev:
2222
pytest: ^8.3.3

‎.speakeasy/workflow.lock

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.456.0
1+
speakeasyVersion: 1.456.1
22
sources:
33
Polar-OAS:
44
sourceNamespace: polar-oas
5-
sourceRevisionDigest: sha256:bf5ff5b95a411e176747cc3d436aa5e5587c97a32cf7d19697fad3bbf66de6a2
6-
sourceBlobDigest: sha256:937f1e89736ba0d1ed3c2affd965fdb1e7213012c7b7f15b20541a9e9f829620
5+
sourceRevisionDigest: sha256:6c834590418d648bd10d0825628fe11bda41e355840bcb83319e3435ca322d5b
6+
sourceBlobDigest: sha256:2fcb4a497110dfacf53652f840b4586fd532f15ddfa11dc8329db9987c54371a
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1734426902
9+
- speakeasy-sdk-regen-1734653531
1010
- 0.1.0
1111
targets:
1212
polar:
1313
source: Polar-OAS
1414
sourceNamespace: polar-oas
15-
sourceRevisionDigest: sha256:bf5ff5b95a411e176747cc3d436aa5e5587c97a32cf7d19697fad3bbf66de6a2
16-
sourceBlobDigest: sha256:937f1e89736ba0d1ed3c2affd965fdb1e7213012c7b7f15b20541a9e9f829620
15+
sourceRevisionDigest: sha256:6c834590418d648bd10d0825628fe11bda41e355840bcb83319e3435ca322d5b
16+
sourceBlobDigest: sha256:2fcb4a497110dfacf53652f840b4586fd532f15ddfa11dc8329db9987c54371a
1717
codeSamplesNamespace: polar-oas-code-samples
18-
codeSamplesRevisionDigest: sha256:6d72157e60f4b6c750710d45f83796e1d03eec680f8aa712d0e076c995a8280c
18+
codeSamplesRevisionDigest: sha256:8343363a8e0f25db3b3bdbcc73302d71c8c9b25ad9f0905047f680d6398fa774
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

‎README.md

+4
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,10 @@ def webhook():
575575
* [update](docs/sdks/polarsubscriptions/README.md#update) - Update Subscription
576576
* [cancel](docs/sdks/polarsubscriptions/README.md#cancel) - Cancel Subscription
577577

578+
### [customer_sessions](docs/sdks/customersessions/README.md)
579+
580+
* [create](docs/sdks/customersessions/README.md#create) - Create Customer Session
581+
578582
### [customers](docs/sdks/customers/README.md)
579583

580584
* [list](docs/sdks/customers/README.md#list) - List Customers

‎RELEASES.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -393,4 +393,14 @@ Based on:
393393
### Generated
394394
- [python v0.11.0] .
395395
### Releases
396-
- [PyPI v0.11.0] https://pypi.org/project/polar-sdk/0.11.0 - .
396+
- [PyPI v0.11.0] https://pypi.org/project/polar-sdk/0.11.0 - .
397+
398+
## 2024-12-20 00:12:07
399+
### Changes
400+
Based on:
401+
- OpenAPI Doc
402+
- Speakeasy CLI 1.456.1 (2.481.0) https://github.com/speakeasy-api/speakeasy
403+
### Generated
404+
- [python v0.11.1] .
405+
### Releases
406+
- [PyPI v0.11.1] https://pypi.org/project/polar-sdk/0.11.1 - .

‎codeSamples.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,12 @@ actions:
267267
- "lang": "python"
268268
"label": "update"
269269
"source": "from polar_sdk import Polar\n\nwith Polar(\n access_token=\"<YOUR_BEARER_TOKEN_HERE>\",\n) as polar:\n\n res = polar.customer_portal.subscriptions.update(id=\"<value>\", customer_subscription_update={\n \"product_price_id\": \"<value>\",\n })\n\n # Handle response\n print(res)"
270+
- target: $["paths"]["/v1/customer-sessions/"]["post"]
271+
update:
272+
"x-codeSamples":
273+
- "lang": "python"
274+
"label": "create"
275+
"source": "from polar_sdk import Polar\n\nwith Polar(\n access_token=\"<YOUR_BEARER_TOKEN_HERE>\",\n) as polar:\n\n res = polar.customer_sessions.create(request={\n \"customer_id\": \"<value>\",\n })\n\n # Handle response\n print(res)"
270276
- target: $["paths"]["/v1/customers/"]["get"]
271277
update:
272278
"x-codeSamples":

‎docs/models/customersession.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# CustomerSession
2+
3+
A customer session that can be used to authenticate as a customer.
4+
5+
6+
## Fields
7+
8+
| Field | Type | Required | Description |
9+
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
10+
| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Creation timestamp of the object. |
11+
| `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Last modification timestamp of the object. |
12+
| `id` | *str* | :heavy_check_mark: | The ID of the object. |
13+
| `token` | *str* | :heavy_check_mark: | N/A |
14+
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A |
15+
| `customer_id` | *str* | :heavy_check_mark: | N/A |
16+
| `customer` | [models.Customer](../models/customer.md) | :heavy_check_mark: | A customer in an organization. |

‎docs/models/customersessioncreate.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# CustomerSessionCreate
2+
3+
Schema for creating a customer session.
4+
5+
6+
## Fields
7+
8+
| Field | Type | Required | Description |
9+
| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- |
10+
| `customer_id` | *str* | :heavy_check_mark: | ID of the customer to create a session for. |

‎docs/models/scope.md

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
| `SUBSCRIPTIONS_WRITE` | subscriptions:write |
3232
| `CUSTOMERS_READ` | customers:read |
3333
| `CUSTOMERS_WRITE` | customers:write |
34+
| `CUSTOMER_SESSIONS_WRITE` | customer_sessions:write |
3435
| `ORDERS_READ` | orders:read |
3536
| `METRICS_READ` | metrics:read |
3637
| `WEBHOOKS_READ` | webhooks:read |

‎docs/sdks/customersessions/README.md

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# CustomerSessions
2+
(*customer_sessions*)
3+
4+
## Overview
5+
6+
### Available Operations
7+
8+
* [create](#create) - Create Customer Session
9+
10+
## create
11+
12+
Create a customer session.
13+
14+
### Example Usage
15+
16+
```python
17+
from polar_sdk import Polar
18+
19+
with Polar(
20+
access_token="<YOUR_BEARER_TOKEN_HERE>",
21+
) as polar:
22+
23+
res = polar.customer_sessions.create(request={
24+
"customer_id": "<value>",
25+
})
26+
27+
# Handle response
28+
print(res)
29+
30+
```
31+
32+
### Parameters
33+
34+
| Parameter | Type | Required | Description |
35+
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
36+
| `request` | [models.CustomerSessionCreate](../../models/customersessioncreate.md) | :heavy_check_mark: | The request object to use for the request. |
37+
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
38+
39+
### Response
40+
41+
**[models.CustomerSession](../../models/customersession.md)**
42+
43+
### Errors
44+
45+
| Error Type | Status Code | Content Type |
46+
| -------------------------- | -------------------------- | -------------------------- |
47+
| models.HTTPValidationError | 422 | application/json |
48+
| models.SDKError | 4XX, 5XX | \*/\* |

‎pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "polar-sdk"
3-
version = "0.11.0"
3+
version = "0.11.1"
44
description = "Polar SDK for Python"
55
authors = ["Polar",]
66
readme = "README-PYPI.md"

‎src/polar_sdk/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import importlib.metadata
44

55
__title__: str = "polar-sdk"
6-
__version__: str = "0.11.0"
6+
__version__: str = "0.11.1"
77

88
try:
99
if __package__ is not None:

‎src/polar_sdk/customer_sessions.py

+193
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2+
3+
from .basesdk import BaseSDK
4+
from polar_sdk import models, utils
5+
from polar_sdk._hooks import HookContext
6+
from polar_sdk.types import BaseModel, OptionalNullable, UNSET
7+
from typing import Any, Mapping, Optional, Union, cast
8+
9+
10+
class CustomerSessions(BaseSDK):
11+
def create(
12+
self,
13+
*,
14+
request: Union[
15+
models.CustomerSessionCreate, models.CustomerSessionCreateTypedDict
16+
],
17+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
18+
server_url: Optional[str] = None,
19+
timeout_ms: Optional[int] = None,
20+
http_headers: Optional[Mapping[str, str]] = None,
21+
) -> models.CustomerSession:
22+
r"""Create Customer Session
23+
24+
Create a customer session.
25+
26+
:param request: The request object to send.
27+
:param retries: Override the default retry configuration for this method
28+
:param server_url: Override the default server URL for this method
29+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
30+
:param http_headers: Additional headers to set or replace on requests.
31+
"""
32+
base_url = None
33+
url_variables = None
34+
if timeout_ms is None:
35+
timeout_ms = self.sdk_configuration.timeout_ms
36+
37+
if server_url is not None:
38+
base_url = server_url
39+
40+
if not isinstance(request, BaseModel):
41+
request = utils.unmarshal(request, models.CustomerSessionCreate)
42+
request = cast(models.CustomerSessionCreate, request)
43+
44+
req = self.build_request(
45+
method="POST",
46+
path="/v1/customer-sessions/",
47+
base_url=base_url,
48+
url_variables=url_variables,
49+
request=request,
50+
request_body_required=True,
51+
request_has_path_params=False,
52+
request_has_query_params=True,
53+
user_agent_header="user-agent",
54+
accept_header_value="application/json",
55+
http_headers=http_headers,
56+
security=self.sdk_configuration.security,
57+
get_serialized_body=lambda: utils.serialize_request_body(
58+
request, False, False, "json", models.CustomerSessionCreate
59+
),
60+
timeout_ms=timeout_ms,
61+
)
62+
63+
if retries == UNSET:
64+
if self.sdk_configuration.retry_config is not UNSET:
65+
retries = self.sdk_configuration.retry_config
66+
67+
retry_config = None
68+
if isinstance(retries, utils.RetryConfig):
69+
retry_config = (retries, ["429", "500", "502", "503", "504"])
70+
71+
http_res = self.do_request(
72+
hook_ctx=HookContext(
73+
operation_id="customer-sessions:create",
74+
oauth2_scopes=[],
75+
security_source=self.sdk_configuration.security,
76+
),
77+
request=req,
78+
error_status_codes=["422", "4XX", "5XX"],
79+
retry_config=retry_config,
80+
)
81+
82+
data: Any = None
83+
if utils.match_response(http_res, "201", "application/json"):
84+
return utils.unmarshal_json(http_res.text, models.CustomerSession)
85+
if utils.match_response(http_res, "422", "application/json"):
86+
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
87+
raise models.HTTPValidationError(data=data)
88+
if utils.match_response(http_res, ["4XX", "5XX"], "*"):
89+
http_res_text = utils.stream_to_text(http_res)
90+
raise models.SDKError(
91+
"API error occurred", http_res.status_code, http_res_text, http_res
92+
)
93+
94+
content_type = http_res.headers.get("Content-Type")
95+
http_res_text = utils.stream_to_text(http_res)
96+
raise models.SDKError(
97+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
98+
http_res.status_code,
99+
http_res_text,
100+
http_res,
101+
)
102+
103+
async def create_async(
104+
self,
105+
*,
106+
request: Union[
107+
models.CustomerSessionCreate, models.CustomerSessionCreateTypedDict
108+
],
109+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
110+
server_url: Optional[str] = None,
111+
timeout_ms: Optional[int] = None,
112+
http_headers: Optional[Mapping[str, str]] = None,
113+
) -> models.CustomerSession:
114+
r"""Create Customer Session
115+
116+
Create a customer session.
117+
118+
:param request: The request object to send.
119+
:param retries: Override the default retry configuration for this method
120+
:param server_url: Override the default server URL for this method
121+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
122+
:param http_headers: Additional headers to set or replace on requests.
123+
"""
124+
base_url = None
125+
url_variables = None
126+
if timeout_ms is None:
127+
timeout_ms = self.sdk_configuration.timeout_ms
128+
129+
if server_url is not None:
130+
base_url = server_url
131+
132+
if not isinstance(request, BaseModel):
133+
request = utils.unmarshal(request, models.CustomerSessionCreate)
134+
request = cast(models.CustomerSessionCreate, request)
135+
136+
req = self.build_request_async(
137+
method="POST",
138+
path="/v1/customer-sessions/",
139+
base_url=base_url,
140+
url_variables=url_variables,
141+
request=request,
142+
request_body_required=True,
143+
request_has_path_params=False,
144+
request_has_query_params=True,
145+
user_agent_header="user-agent",
146+
accept_header_value="application/json",
147+
http_headers=http_headers,
148+
security=self.sdk_configuration.security,
149+
get_serialized_body=lambda: utils.serialize_request_body(
150+
request, False, False, "json", models.CustomerSessionCreate
151+
),
152+
timeout_ms=timeout_ms,
153+
)
154+
155+
if retries == UNSET:
156+
if self.sdk_configuration.retry_config is not UNSET:
157+
retries = self.sdk_configuration.retry_config
158+
159+
retry_config = None
160+
if isinstance(retries, utils.RetryConfig):
161+
retry_config = (retries, ["429", "500", "502", "503", "504"])
162+
163+
http_res = await self.do_request_async(
164+
hook_ctx=HookContext(
165+
operation_id="customer-sessions:create",
166+
oauth2_scopes=[],
167+
security_source=self.sdk_configuration.security,
168+
),
169+
request=req,
170+
error_status_codes=["422", "4XX", "5XX"],
171+
retry_config=retry_config,
172+
)
173+
174+
data: Any = None
175+
if utils.match_response(http_res, "201", "application/json"):
176+
return utils.unmarshal_json(http_res.text, models.CustomerSession)
177+
if utils.match_response(http_res, "422", "application/json"):
178+
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
179+
raise models.HTTPValidationError(data=data)
180+
if utils.match_response(http_res, ["4XX", "5XX"], "*"):
181+
http_res_text = await utils.stream_to_text_async(http_res)
182+
raise models.SDKError(
183+
"API error occurred", http_res.status_code, http_res_text, http_res
184+
)
185+
186+
content_type = http_res.headers.get("Content-Type")
187+
http_res_text = await utils.stream_to_text_async(http_res)
188+
raise models.SDKError(
189+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
190+
http_res.status_code,
191+
http_res_text,
192+
http_res,
193+
)

‎src/polar_sdk/models/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,8 @@
710710
CustomersListResponseTypedDict,
711711
)
712712
from .customers_updateop import CustomersUpdateRequest, CustomersUpdateRequestTypedDict
713+
from .customersession import CustomerSession, CustomerSessionTypedDict
714+
from .customersessioncreate import CustomerSessionCreate, CustomerSessionCreateTypedDict
713715
from .customersortproperty import CustomerSortProperty
714716
from .customersubscription import CustomerSubscription, CustomerSubscriptionTypedDict
715717
from .customersubscriptionproduct import (
@@ -2222,6 +2224,10 @@
22222224
"CustomerPortalSubscriptionsListResponseTypedDict",
22232225
"CustomerPortalSubscriptionsUpdateRequest",
22242226
"CustomerPortalSubscriptionsUpdateRequestTypedDict",
2227+
"CustomerSession",
2228+
"CustomerSessionCreate",
2229+
"CustomerSessionCreateTypedDict",
2230+
"CustomerSessionTypedDict",
22252231
"CustomerSortProperty",
22262232
"CustomerSubscription",
22272233
"CustomerSubscriptionProduct",
+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2+
3+
from __future__ import annotations
4+
from .customer import Customer, CustomerTypedDict
5+
from datetime import datetime
6+
from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL
7+
from pydantic import model_serializer
8+
from typing_extensions import TypedDict
9+
10+
11+
class CustomerSessionTypedDict(TypedDict):
12+
r"""A customer session that can be used to authenticate as a customer."""
13+
14+
created_at: datetime
15+
r"""Creation timestamp of the object."""
16+
modified_at: Nullable[datetime]
17+
r"""Last modification timestamp of the object."""
18+
id: str
19+
r"""The ID of the object."""
20+
token: str
21+
expires_at: datetime
22+
customer_id: str
23+
customer: CustomerTypedDict
24+
r"""A customer in an organization."""
25+
26+
27+
class CustomerSession(BaseModel):
28+
r"""A customer session that can be used to authenticate as a customer."""
29+
30+
created_at: datetime
31+
r"""Creation timestamp of the object."""
32+
33+
modified_at: Nullable[datetime]
34+
r"""Last modification timestamp of the object."""
35+
36+
id: str
37+
r"""The ID of the object."""
38+
39+
token: str
40+
41+
expires_at: datetime
42+
43+
customer_id: str
44+
45+
customer: Customer
46+
r"""A customer in an organization."""
47+
48+
@model_serializer(mode="wrap")
49+
def serialize_model(self, handler):
50+
optional_fields = []
51+
nullable_fields = ["modified_at"]
52+
null_default_fields = []
53+
54+
serialized = handler(self)
55+
56+
m = {}
57+
58+
for n, f in self.model_fields.items():
59+
k = f.alias or n
60+
val = serialized.get(k)
61+
serialized.pop(k, None)
62+
63+
optional_nullable = k in optional_fields and k in nullable_fields
64+
is_set = (
65+
self.__pydantic_fields_set__.intersection({n})
66+
or k in null_default_fields
67+
) # pylint: disable=no-member
68+
69+
if val is not None and val != UNSET_SENTINEL:
70+
m[k] = val
71+
elif val != UNSET_SENTINEL and (
72+
not k in optional_fields or (optional_nullable and is_set)
73+
):
74+
m[k] = val
75+
76+
return m
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2+
3+
from __future__ import annotations
4+
from polar_sdk.types import BaseModel
5+
from typing_extensions import TypedDict
6+
7+
8+
class CustomerSessionCreateTypedDict(TypedDict):
9+
r"""Schema for creating a customer session."""
10+
11+
customer_id: str
12+
r"""ID of the customer to create a session for."""
13+
14+
15+
class CustomerSessionCreate(BaseModel):
16+
r"""Schema for creating a customer session."""
17+
18+
customer_id: str
19+
r"""ID of the customer to create a session for."""

‎src/polar_sdk/models/oauth2client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class OAuth2Client(BaseModel):
7373
response_types: Optional[List[ResponseTypes]] = None
7474

7575
scope: Optional[str] = (
76-
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write"
76+
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write"
7777
)
7878

7979
client_uri: OptionalNullable[str] = UNSET

‎src/polar_sdk/models/oauth2clientconfiguration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class OAuth2ClientConfiguration(BaseModel):
5252
response_types: Optional[List[OAuth2ClientConfigurationResponseTypes]] = None
5353

5454
scope: Optional[str] = (
55-
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write"
55+
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write"
5656
)
5757

5858
client_uri: OptionalNullable[str] = UNSET

‎src/polar_sdk/models/oauth2clientconfigurationupdate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class OAuth2ClientConfigurationUpdate(BaseModel):
5555
response_types: Optional[List[OAuth2ClientConfigurationUpdateResponseTypes]] = None
5656

5757
scope: Optional[str] = (
58-
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write"
58+
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write"
5959
)
6060

6161
client_uri: OptionalNullable[str] = UNSET

‎src/polar_sdk/models/scope.py

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class Scope(str, Enum):
3131
SUBSCRIPTIONS_WRITE = "subscriptions:write"
3232
CUSTOMERS_READ = "customers:read"
3333
CUSTOMERS_WRITE = "customers:write"
34+
CUSTOMER_SESSIONS_WRITE = "customer_sessions:write"
3435
ORDERS_READ = "orders:read"
3536
METRICS_READ = "metrics:read"
3637
WEBHOOKS_READ = "webhooks:read"

‎src/polar_sdk/sdk.py

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from polar_sdk.checkouts import Checkouts
1515
from polar_sdk.custom_fields import CustomFields
1616
from polar_sdk.customer_portal import CustomerPortal
17+
from polar_sdk.customer_sessions import CustomerSessions
1718
from polar_sdk.customers import Customers
1819
from polar_sdk.discounts import Discounts
1920
from polar_sdk.external_organizations import ExternalOrganizations
@@ -54,6 +55,7 @@ class Polar(BaseSDK):
5455
discounts: Discounts
5556
customers: Customers
5657
customer_portal: CustomerPortal
58+
customer_sessions: CustomerSessions
5759

5860
def __init__(
5961
self,
@@ -152,6 +154,7 @@ def _init_sdks(self):
152154
self.discounts = Discounts(self.sdk_configuration)
153155
self.customers = Customers(self.sdk_configuration)
154156
self.customer_portal = CustomerPortal(self.sdk_configuration)
157+
self.customer_sessions = CustomerSessions(self.sdk_configuration)
155158

156159
def __enter__(self):
157160
return self

‎src/polar_sdk/sdkconfiguration.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ class SDKConfiguration:
3131
server: Optional[str] = ""
3232
language: str = "python"
3333
openapi_doc_version: str = "0.1.0"
34-
sdk_version: str = "0.11.0"
34+
sdk_version: str = "0.11.1"
3535
gen_version: str = "2.481.0"
36-
user_agent: str = "speakeasy-sdk/python 0.11.0 2.481.0 0.1.0 polar-sdk"
36+
user_agent: str = "speakeasy-sdk/python 0.11.1 2.481.0 0.1.0 polar-sdk"
3737
retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET)
3838
timeout_ms: Optional[int] = None
3939

0 commit comments

Comments
 (0)
Please sign in to comment.