Skip to content

Commit 1e136f4

Browse files
fix: models import error (#3)
2 parents 0cf92a8 + d8cf84a commit 1e136f4

4 files changed

Lines changed: 23 additions & 23 deletions

File tree

autumn/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def attach(
130130
131131
Returns
132132
-------
133-
:class:`~autumn.types.response.AttachResponse`
133+
:class:`~autumn.models.response.AttachResponse`
134134
The response from the API.
135135
"""
136136

@@ -183,7 +183,7 @@ def check(
183183
184184
Returns
185185
-------
186-
:class:`~autumn.types.response.CheckResponse`
186+
:class:`~autumn.models.response.CheckResponse`
187187
The response from the API.
188188
"""
189189

@@ -232,7 +232,7 @@ def track(
232232
233233
Returns
234234
-------
235-
:class:`~autumn.types.response.TrackResponse`
235+
:class:`~autumn.models.response.TrackResponse`
236236
The response from the API.
237237
"""
238238
payload = _build_payload(locals(), self.track)

autumn/customers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def get(self, customer_id) -> Union[Customer, Coroutine[Any, Any, Customer]]:
5656
5757
Returns
5858
-------
59-
:class:`~autumn.types.customers.Customer`
59+
:class:`~autumn.models.customers.Customer`
6060
The customer.
6161
"""
6262
return self._http.request("GET", f"/customers/{customer_id}", Customer)
@@ -106,7 +106,7 @@ def create(
106106
107107
Returns
108108
-------
109-
:class:`~autumn.types.customers.Customer`
109+
:class:`~autumn.models.customers.Customer`
110110
The created customer.
111111
"""
112112
payload = _build_payload(locals(), self.create) # type: ignore
@@ -157,7 +157,7 @@ def update(
157157
158158
Returns
159159
-------
160-
:class:`~autumn.types.customers.Customer`
160+
:class:`~autumn.models.customers.Customer`
161161
The updated customer.
162162
"""
163163
payload = _build_payload(locals(), self.update, ignore={"customer_id"}) # type: ignore
@@ -200,7 +200,7 @@ def get_billing_portal(
200200
201201
Returns
202202
-------
203-
:class:`~autumn.types.response.BillingPortalResponse`
203+
:class:`~autumn.models.response.BillingPortalResponse`
204204
The billing portal URL.
205205
"""
206206
payload = _build_payload(
@@ -239,7 +239,7 @@ def pricing_table(
239239
240240
Returns
241241
-------
242-
:class:`~autumn.types.response.PricingTableResponse`
242+
:class:`~autumn.models.response.PricingTableResponse`
243243
The pricing table.
244244
"""
245245
params = {"customer_id": customer_id}

autumn/features.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def set_usage(
6464
6565
Returns
6666
-------
67-
:class:`~autumn.types.response.Empty`
67+
:class:`~autumn.models.response.Empty`
6868
This is a placeholder type. Treat it as :class:`None`.
6969
"""
7070
payload = _build_payload(locals(), self.set_usage, ignore={"customer_id"}) # type: ignore
@@ -100,12 +100,12 @@ def set_balances(
100100
----------
101101
customer_id: str
102102
The ID of the customer to set the balances for.
103-
balances: List[:class:`~autumn.types.balance.Balance`]
103+
balances: List[:class:`~autumn.models.balance.Balance`]
104104
The balances to set for the customer.
105105
106106
Returns
107107
-------
108-
:class:`~autumn.types.response.Empty`
108+
:class:`~autumn.models.response.Empty`
109109
This is a placeholder type. Treat it as :class:`None`.
110110
"""
111111

@@ -152,7 +152,7 @@ def create_entity(
152152
153153
Returns
154154
-------
155-
:class:`~autumn.types.response.Empty`
155+
:class:`~autumn.models.response.Empty`
156156
This is a placeholder type. Treat it as :class:`None`.
157157
"""
158158

@@ -225,7 +225,7 @@ def delete_entity(
225225
226226
Returns
227227
-------
228-
:class:`~autumn.types.response.Empty`
228+
:class:`~autumn.models.response.Empty`
229229
This is a placeholder type. Treat it as :class:`None`.
230230
"""
231231

autumn/products.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
TYPE_CHECKING,
1313
)
1414

15-
from .types.products import ProductItem, FreeTrial
16-
from .types.response import (
15+
from .models.products import ProductItem, FreeTrial
16+
from .models.response import (
1717
CreateProductResponse,
1818
GetProductResponse,
1919
ReferralCodeResponse,
@@ -111,7 +111,7 @@ def create(
111111
112112
Returns
113113
-------
114-
:class:`~autumn.types.response.CreateProductResponse`
114+
:class:`~autumn.models.response.CreateProductResponse`
115115
The response from the API.
116116
"""
117117
payload = _build_payload(locals(), self.create) # type: ignore
@@ -145,7 +145,7 @@ def get(
145145
146146
Returns
147147
-------
148-
:class:`~autumn.types.response.GetProductResponse`
148+
:class:`~autumn.models.response.GetProductResponse`
149149
The response from the API.
150150
"""
151151
return self._http.request("GET", f"/products/{id}", GetProductResponse)
@@ -182,7 +182,7 @@ def get_referral_code(
182182
183183
Returns
184184
-------
185-
:class:`~autumn.types.response.ReferralCodeResponse`
185+
:class:`~autumn.models.response.ReferralCodeResponse`
186186
The response from the API.
187187
"""
188188

@@ -231,7 +231,7 @@ def redeem_referral_code(
231231
232232
Returns
233233
-------
234-
:class:`~autumn.types.response.ReferralRedeemResponse`
234+
:class:`~autumn.models.response.ReferralRedeemResponse`
235235
The response from the API.
236236
"""
237237
payload = _build_payload(locals(), self.redeem_referral_code) # type: ignore
@@ -249,7 +249,7 @@ def cancel(
249249
product_id: str,
250250
*,
251251
entity_id: Optional[str] = None,
252-
cancel_immediately: bool = False
252+
cancel_immediately: bool = False,
253253
) -> ProductCancelResponse: ...
254254

255255
@overload
@@ -259,7 +259,7 @@ def cancel(
259259
product_id: str,
260260
*,
261261
entity_id: Optional[str] = None,
262-
cancel_immediately: bool = False
262+
cancel_immediately: bool = False,
263263
) -> Coroutine[Any, Any, ProductCancelResponse]: ...
264264

265265
def cancel(
@@ -268,7 +268,7 @@ def cancel(
268268
product_id: str,
269269
*,
270270
entity_id: Optional[str] = None,
271-
cancel_immediately: bool = False
271+
cancel_immediately: bool = False,
272272
) -> Union[ProductCancelResponse, Coroutine[Any, Any, ProductCancelResponse]]:
273273
"""Cancel a product for a customer.
274274
@@ -287,7 +287,7 @@ def cancel(
287287
288288
Returns
289289
-------
290-
:class:`~autumn.types.response.ProductCancelResponse`
290+
:class:`~autumn.models.response.ProductCancelResponse`
291291
The response from the API.
292292
"""
293293
payload = _build_payload(locals(), self.cancel_product) # type: ignore

0 commit comments

Comments
 (0)