paid-python 1.0.0a1__py3-none-any.whl → 1.0.0a2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- paid/contacts/client.py +32 -30
- paid/contacts/raw_client.py +16 -14
- paid/core/client_wrapper.py +2 -2
- paid/customers/client.py +38 -36
- paid/customers/raw_client.py +20 -20
- paid/invoices/client.py +18 -18
- paid/invoices/raw_client.py +12 -10
- paid/orders/client.py +34 -32
- paid/orders/raw_client.py +18 -16
- paid/products/client.py +26 -26
- paid/products/raw_client.py +16 -14
- paid/signals/client.py +6 -6
- paid/signals/raw_client.py +2 -2
- {paid_python-1.0.0a1.dist-info → paid_python-1.0.0a2.dist-info}/METADATA +2 -1
- {paid_python-1.0.0a1.dist-info → paid_python-1.0.0a2.dist-info}/RECORD +17 -17
- {paid_python-1.0.0a1.dist-info → paid_python-1.0.0a2.dist-info}/LICENSE +0 -0
- {paid_python-1.0.0a1.dist-info → paid_python-1.0.0a2.dist-info}/WHEEL +0 -0
paid/customers/raw_client.py
CHANGED
|
@@ -111,7 +111,7 @@ class RawCustomersClient:
|
|
|
111
111
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
112
112
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
113
113
|
|
|
114
|
-
def
|
|
114
|
+
def create_customer(
|
|
115
115
|
self,
|
|
116
116
|
*,
|
|
117
117
|
name: str,
|
|
@@ -230,11 +230,11 @@ class RawCustomersClient:
|
|
|
230
230
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
231
231
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
232
232
|
|
|
233
|
-
def
|
|
233
|
+
def get_customer_by_id(
|
|
234
234
|
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
235
235
|
) -> HttpResponse[Customer]:
|
|
236
236
|
"""
|
|
237
|
-
Get a customer by
|
|
237
|
+
Get a customer by ID
|
|
238
238
|
|
|
239
239
|
Parameters
|
|
240
240
|
----------
|
|
@@ -301,7 +301,7 @@ class RawCustomersClient:
|
|
|
301
301
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
302
302
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
303
303
|
|
|
304
|
-
def
|
|
304
|
+
def update_customer_by_id(
|
|
305
305
|
self,
|
|
306
306
|
id: str,
|
|
307
307
|
*,
|
|
@@ -319,7 +319,7 @@ class RawCustomersClient:
|
|
|
319
319
|
request_options: typing.Optional[RequestOptions] = None,
|
|
320
320
|
) -> HttpResponse[Customer]:
|
|
321
321
|
"""
|
|
322
|
-
Update a customer by
|
|
322
|
+
Update a customer by ID
|
|
323
323
|
|
|
324
324
|
Parameters
|
|
325
325
|
----------
|
|
@@ -438,11 +438,11 @@ class RawCustomersClient:
|
|
|
438
438
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
439
439
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
440
440
|
|
|
441
|
-
def
|
|
441
|
+
def delete_customer_by_id(
|
|
442
442
|
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
443
443
|
) -> HttpResponse[EmptyResponse]:
|
|
444
444
|
"""
|
|
445
|
-
Delete a customer by
|
|
445
|
+
Delete a customer by ID
|
|
446
446
|
|
|
447
447
|
Parameters
|
|
448
448
|
----------
|
|
@@ -513,7 +513,7 @@ class RawCustomersClient:
|
|
|
513
513
|
self, external_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
514
514
|
) -> HttpResponse[Customer]:
|
|
515
515
|
"""
|
|
516
|
-
Get a customer by
|
|
516
|
+
Get a customer by external ID
|
|
517
517
|
|
|
518
518
|
Parameters
|
|
519
519
|
----------
|
|
@@ -598,7 +598,7 @@ class RawCustomersClient:
|
|
|
598
598
|
request_options: typing.Optional[RequestOptions] = None,
|
|
599
599
|
) -> HttpResponse[Customer]:
|
|
600
600
|
"""
|
|
601
|
-
Update a customer by
|
|
601
|
+
Update a customer by external ID
|
|
602
602
|
|
|
603
603
|
Parameters
|
|
604
604
|
----------
|
|
@@ -721,7 +721,7 @@ class RawCustomersClient:
|
|
|
721
721
|
self, external_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
722
722
|
) -> HttpResponse[EmptyResponse]:
|
|
723
723
|
"""
|
|
724
|
-
Delete a customer by
|
|
724
|
+
Delete a customer by external ID
|
|
725
725
|
|
|
726
726
|
Parameters
|
|
727
727
|
----------
|
|
@@ -874,7 +874,7 @@ class AsyncRawCustomersClient:
|
|
|
874
874
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
875
875
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
876
876
|
|
|
877
|
-
async def
|
|
877
|
+
async def create_customer(
|
|
878
878
|
self,
|
|
879
879
|
*,
|
|
880
880
|
name: str,
|
|
@@ -993,11 +993,11 @@ class AsyncRawCustomersClient:
|
|
|
993
993
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
994
994
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
995
995
|
|
|
996
|
-
async def
|
|
996
|
+
async def get_customer_by_id(
|
|
997
997
|
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
998
998
|
) -> AsyncHttpResponse[Customer]:
|
|
999
999
|
"""
|
|
1000
|
-
Get a customer by
|
|
1000
|
+
Get a customer by ID
|
|
1001
1001
|
|
|
1002
1002
|
Parameters
|
|
1003
1003
|
----------
|
|
@@ -1064,7 +1064,7 @@ class AsyncRawCustomersClient:
|
|
|
1064
1064
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
1065
1065
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
1066
1066
|
|
|
1067
|
-
async def
|
|
1067
|
+
async def update_customer_by_id(
|
|
1068
1068
|
self,
|
|
1069
1069
|
id: str,
|
|
1070
1070
|
*,
|
|
@@ -1082,7 +1082,7 @@ class AsyncRawCustomersClient:
|
|
|
1082
1082
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1083
1083
|
) -> AsyncHttpResponse[Customer]:
|
|
1084
1084
|
"""
|
|
1085
|
-
Update a customer by
|
|
1085
|
+
Update a customer by ID
|
|
1086
1086
|
|
|
1087
1087
|
Parameters
|
|
1088
1088
|
----------
|
|
@@ -1201,11 +1201,11 @@ class AsyncRawCustomersClient:
|
|
|
1201
1201
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
1202
1202
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
1203
1203
|
|
|
1204
|
-
async def
|
|
1204
|
+
async def delete_customer_by_id(
|
|
1205
1205
|
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
1206
1206
|
) -> AsyncHttpResponse[EmptyResponse]:
|
|
1207
1207
|
"""
|
|
1208
|
-
Delete a customer by
|
|
1208
|
+
Delete a customer by ID
|
|
1209
1209
|
|
|
1210
1210
|
Parameters
|
|
1211
1211
|
----------
|
|
@@ -1276,7 +1276,7 @@ class AsyncRawCustomersClient:
|
|
|
1276
1276
|
self, external_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
1277
1277
|
) -> AsyncHttpResponse[Customer]:
|
|
1278
1278
|
"""
|
|
1279
|
-
Get a customer by
|
|
1279
|
+
Get a customer by external ID
|
|
1280
1280
|
|
|
1281
1281
|
Parameters
|
|
1282
1282
|
----------
|
|
@@ -1361,7 +1361,7 @@ class AsyncRawCustomersClient:
|
|
|
1361
1361
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1362
1362
|
) -> AsyncHttpResponse[Customer]:
|
|
1363
1363
|
"""
|
|
1364
|
-
Update a customer by
|
|
1364
|
+
Update a customer by external ID
|
|
1365
1365
|
|
|
1366
1366
|
Parameters
|
|
1367
1367
|
----------
|
|
@@ -1484,7 +1484,7 @@ class AsyncRawCustomersClient:
|
|
|
1484
1484
|
self, external_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
1485
1485
|
) -> AsyncHttpResponse[EmptyResponse]:
|
|
1486
1486
|
"""
|
|
1487
|
-
Delete a customer by
|
|
1487
|
+
Delete a customer by external ID
|
|
1488
1488
|
|
|
1489
1489
|
Parameters
|
|
1490
1490
|
----------
|
paid/invoices/client.py
CHANGED
|
@@ -64,9 +64,9 @@ class InvoicesClient:
|
|
|
64
64
|
_response = self._raw_client.list_invoices(limit=limit, offset=offset, request_options=request_options)
|
|
65
65
|
return _response.data
|
|
66
66
|
|
|
67
|
-
def
|
|
67
|
+
def get_invoice_by_id(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Invoice:
|
|
68
68
|
"""
|
|
69
|
-
Get an invoice by
|
|
69
|
+
Get an invoice by ID
|
|
70
70
|
|
|
71
71
|
Parameters
|
|
72
72
|
----------
|
|
@@ -87,14 +87,14 @@ class InvoicesClient:
|
|
|
87
87
|
client = Paid(
|
|
88
88
|
token="YOUR_TOKEN",
|
|
89
89
|
)
|
|
90
|
-
client.invoices.
|
|
90
|
+
client.invoices.get_invoice_by_id(
|
|
91
91
|
id="id",
|
|
92
92
|
)
|
|
93
93
|
"""
|
|
94
|
-
_response = self._raw_client.
|
|
94
|
+
_response = self._raw_client.get_invoice_by_id(id, request_options=request_options)
|
|
95
95
|
return _response.data
|
|
96
96
|
|
|
97
|
-
def
|
|
97
|
+
def update_invoice_by_id(
|
|
98
98
|
self,
|
|
99
99
|
id: str,
|
|
100
100
|
*,
|
|
@@ -102,7 +102,7 @@ class InvoicesClient:
|
|
|
102
102
|
request_options: typing.Optional[RequestOptions] = None,
|
|
103
103
|
) -> Invoice:
|
|
104
104
|
"""
|
|
105
|
-
Update an invoice by
|
|
105
|
+
Update an invoice by ID
|
|
106
106
|
|
|
107
107
|
Parameters
|
|
108
108
|
----------
|
|
@@ -125,11 +125,11 @@ class InvoicesClient:
|
|
|
125
125
|
client = Paid(
|
|
126
126
|
token="YOUR_TOKEN",
|
|
127
127
|
)
|
|
128
|
-
client.invoices.
|
|
128
|
+
client.invoices.update_invoice_by_id(
|
|
129
129
|
id="id",
|
|
130
130
|
)
|
|
131
131
|
"""
|
|
132
|
-
_response = self._raw_client.
|
|
132
|
+
_response = self._raw_client.update_invoice_by_id(id, metadata=metadata, request_options=request_options)
|
|
133
133
|
return _response.data
|
|
134
134
|
|
|
135
135
|
def get_invoice_lines(
|
|
@@ -141,7 +141,7 @@ class InvoicesClient:
|
|
|
141
141
|
request_options: typing.Optional[RequestOptions] = None,
|
|
142
142
|
) -> InvoiceLinesResponse:
|
|
143
143
|
"""
|
|
144
|
-
Get the invoice lines for an invoice by
|
|
144
|
+
Get the invoice lines for an invoice by ID
|
|
145
145
|
|
|
146
146
|
Parameters
|
|
147
147
|
----------
|
|
@@ -233,9 +233,9 @@ class AsyncInvoicesClient:
|
|
|
233
233
|
_response = await self._raw_client.list_invoices(limit=limit, offset=offset, request_options=request_options)
|
|
234
234
|
return _response.data
|
|
235
235
|
|
|
236
|
-
async def
|
|
236
|
+
async def get_invoice_by_id(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Invoice:
|
|
237
237
|
"""
|
|
238
|
-
Get an invoice by
|
|
238
|
+
Get an invoice by ID
|
|
239
239
|
|
|
240
240
|
Parameters
|
|
241
241
|
----------
|
|
@@ -261,17 +261,17 @@ class AsyncInvoicesClient:
|
|
|
261
261
|
|
|
262
262
|
|
|
263
263
|
async def main() -> None:
|
|
264
|
-
await client.invoices.
|
|
264
|
+
await client.invoices.get_invoice_by_id(
|
|
265
265
|
id="id",
|
|
266
266
|
)
|
|
267
267
|
|
|
268
268
|
|
|
269
269
|
asyncio.run(main())
|
|
270
270
|
"""
|
|
271
|
-
_response = await self._raw_client.
|
|
271
|
+
_response = await self._raw_client.get_invoice_by_id(id, request_options=request_options)
|
|
272
272
|
return _response.data
|
|
273
273
|
|
|
274
|
-
async def
|
|
274
|
+
async def update_invoice_by_id(
|
|
275
275
|
self,
|
|
276
276
|
id: str,
|
|
277
277
|
*,
|
|
@@ -279,7 +279,7 @@ class AsyncInvoicesClient:
|
|
|
279
279
|
request_options: typing.Optional[RequestOptions] = None,
|
|
280
280
|
) -> Invoice:
|
|
281
281
|
"""
|
|
282
|
-
Update an invoice by
|
|
282
|
+
Update an invoice by ID
|
|
283
283
|
|
|
284
284
|
Parameters
|
|
285
285
|
----------
|
|
@@ -307,14 +307,14 @@ class AsyncInvoicesClient:
|
|
|
307
307
|
|
|
308
308
|
|
|
309
309
|
async def main() -> None:
|
|
310
|
-
await client.invoices.
|
|
310
|
+
await client.invoices.update_invoice_by_id(
|
|
311
311
|
id="id",
|
|
312
312
|
)
|
|
313
313
|
|
|
314
314
|
|
|
315
315
|
asyncio.run(main())
|
|
316
316
|
"""
|
|
317
|
-
_response = await self._raw_client.
|
|
317
|
+
_response = await self._raw_client.update_invoice_by_id(id, metadata=metadata, request_options=request_options)
|
|
318
318
|
return _response.data
|
|
319
319
|
|
|
320
320
|
async def get_invoice_lines(
|
|
@@ -326,7 +326,7 @@ class AsyncInvoicesClient:
|
|
|
326
326
|
request_options: typing.Optional[RequestOptions] = None,
|
|
327
327
|
) -> InvoiceLinesResponse:
|
|
328
328
|
"""
|
|
329
|
-
Get the invoice lines for an invoice by
|
|
329
|
+
Get the invoice lines for an invoice by ID
|
|
330
330
|
|
|
331
331
|
Parameters
|
|
332
332
|
----------
|
paid/invoices/raw_client.py
CHANGED
|
@@ -107,9 +107,11 @@ class RawInvoicesClient:
|
|
|
107
107
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
108
108
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
109
109
|
|
|
110
|
-
def
|
|
110
|
+
def get_invoice_by_id(
|
|
111
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
112
|
+
) -> HttpResponse[Invoice]:
|
|
111
113
|
"""
|
|
112
|
-
Get an invoice by
|
|
114
|
+
Get an invoice by ID
|
|
113
115
|
|
|
114
116
|
Parameters
|
|
115
117
|
----------
|
|
@@ -176,7 +178,7 @@ class RawInvoicesClient:
|
|
|
176
178
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
177
179
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
178
180
|
|
|
179
|
-
def
|
|
181
|
+
def update_invoice_by_id(
|
|
180
182
|
self,
|
|
181
183
|
id: str,
|
|
182
184
|
*,
|
|
@@ -184,7 +186,7 @@ class RawInvoicesClient:
|
|
|
184
186
|
request_options: typing.Optional[RequestOptions] = None,
|
|
185
187
|
) -> HttpResponse[Invoice]:
|
|
186
188
|
"""
|
|
187
|
-
Update an invoice by
|
|
189
|
+
Update an invoice by ID
|
|
188
190
|
|
|
189
191
|
Parameters
|
|
190
192
|
----------
|
|
@@ -280,7 +282,7 @@ class RawInvoicesClient:
|
|
|
280
282
|
request_options: typing.Optional[RequestOptions] = None,
|
|
281
283
|
) -> HttpResponse[InvoiceLinesResponse]:
|
|
282
284
|
"""
|
|
283
|
-
Get the invoice lines for an invoice by
|
|
285
|
+
Get the invoice lines for an invoice by ID
|
|
284
286
|
|
|
285
287
|
Parameters
|
|
286
288
|
----------
|
|
@@ -441,11 +443,11 @@ class AsyncRawInvoicesClient:
|
|
|
441
443
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
442
444
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
443
445
|
|
|
444
|
-
async def
|
|
446
|
+
async def get_invoice_by_id(
|
|
445
447
|
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
446
448
|
) -> AsyncHttpResponse[Invoice]:
|
|
447
449
|
"""
|
|
448
|
-
Get an invoice by
|
|
450
|
+
Get an invoice by ID
|
|
449
451
|
|
|
450
452
|
Parameters
|
|
451
453
|
----------
|
|
@@ -512,7 +514,7 @@ class AsyncRawInvoicesClient:
|
|
|
512
514
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
513
515
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
514
516
|
|
|
515
|
-
async def
|
|
517
|
+
async def update_invoice_by_id(
|
|
516
518
|
self,
|
|
517
519
|
id: str,
|
|
518
520
|
*,
|
|
@@ -520,7 +522,7 @@ class AsyncRawInvoicesClient:
|
|
|
520
522
|
request_options: typing.Optional[RequestOptions] = None,
|
|
521
523
|
) -> AsyncHttpResponse[Invoice]:
|
|
522
524
|
"""
|
|
523
|
-
Update an invoice by
|
|
525
|
+
Update an invoice by ID
|
|
524
526
|
|
|
525
527
|
Parameters
|
|
526
528
|
----------
|
|
@@ -616,7 +618,7 @@ class AsyncRawInvoicesClient:
|
|
|
616
618
|
request_options: typing.Optional[RequestOptions] = None,
|
|
617
619
|
) -> AsyncHttpResponse[InvoiceLinesResponse]:
|
|
618
620
|
"""
|
|
619
|
-
Get the invoice lines for an invoice by
|
|
621
|
+
Get the invoice lines for an invoice by ID
|
|
620
622
|
|
|
621
623
|
Parameters
|
|
622
624
|
----------
|
paid/orders/client.py
CHANGED
|
@@ -67,7 +67,7 @@ class OrdersClient:
|
|
|
67
67
|
_response = self._raw_client.list_orders(limit=limit, offset=offset, request_options=request_options)
|
|
68
68
|
return _response.data
|
|
69
69
|
|
|
70
|
-
def
|
|
70
|
+
def create_order(
|
|
71
71
|
self,
|
|
72
72
|
*,
|
|
73
73
|
customer_id: str,
|
|
@@ -128,11 +128,11 @@ class OrdersClient:
|
|
|
128
128
|
client = Paid(
|
|
129
129
|
token="YOUR_TOKEN",
|
|
130
130
|
)
|
|
131
|
-
client.orders.
|
|
131
|
+
client.orders.create_order(
|
|
132
132
|
customer_id="customerId",
|
|
133
133
|
)
|
|
134
134
|
"""
|
|
135
|
-
_response = self._raw_client.
|
|
135
|
+
_response = self._raw_client.create_order(
|
|
136
136
|
customer_id=customer_id,
|
|
137
137
|
billing_customer_id=billing_customer_id,
|
|
138
138
|
billing_contact_ids=billing_contact_ids,
|
|
@@ -149,9 +149,9 @@ class OrdersClient:
|
|
|
149
149
|
)
|
|
150
150
|
return _response.data
|
|
151
151
|
|
|
152
|
-
def
|
|
152
|
+
def get_order_by_id(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Order:
|
|
153
153
|
"""
|
|
154
|
-
Get an order by
|
|
154
|
+
Get an order by ID
|
|
155
155
|
|
|
156
156
|
Parameters
|
|
157
157
|
----------
|
|
@@ -172,14 +172,14 @@ class OrdersClient:
|
|
|
172
172
|
client = Paid(
|
|
173
173
|
token="YOUR_TOKEN",
|
|
174
174
|
)
|
|
175
|
-
client.orders.
|
|
175
|
+
client.orders.get_order_by_id(
|
|
176
176
|
id="id",
|
|
177
177
|
)
|
|
178
178
|
"""
|
|
179
|
-
_response = self._raw_client.
|
|
179
|
+
_response = self._raw_client.get_order_by_id(id, request_options=request_options)
|
|
180
180
|
return _response.data
|
|
181
181
|
|
|
182
|
-
def
|
|
182
|
+
def update_order_by_id(
|
|
183
183
|
self,
|
|
184
184
|
id: str,
|
|
185
185
|
*,
|
|
@@ -197,7 +197,7 @@ class OrdersClient:
|
|
|
197
197
|
request_options: typing.Optional[RequestOptions] = None,
|
|
198
198
|
) -> Order:
|
|
199
199
|
"""
|
|
200
|
-
Update an order by
|
|
200
|
+
Update an order by ID
|
|
201
201
|
|
|
202
202
|
Parameters
|
|
203
203
|
----------
|
|
@@ -240,11 +240,11 @@ class OrdersClient:
|
|
|
240
240
|
client = Paid(
|
|
241
241
|
token="YOUR_TOKEN",
|
|
242
242
|
)
|
|
243
|
-
client.orders.
|
|
243
|
+
client.orders.update_order_by_id(
|
|
244
244
|
id="id",
|
|
245
245
|
)
|
|
246
246
|
"""
|
|
247
|
-
_response = self._raw_client.
|
|
247
|
+
_response = self._raw_client.update_order_by_id(
|
|
248
248
|
id,
|
|
249
249
|
name=name,
|
|
250
250
|
start_date=start_date,
|
|
@@ -261,9 +261,9 @@ class OrdersClient:
|
|
|
261
261
|
)
|
|
262
262
|
return _response.data
|
|
263
263
|
|
|
264
|
-
def
|
|
264
|
+
def delete_order_by_id(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> EmptyResponse:
|
|
265
265
|
"""
|
|
266
|
-
Delete an order by
|
|
266
|
+
Delete an order by ID
|
|
267
267
|
|
|
268
268
|
Parameters
|
|
269
269
|
----------
|
|
@@ -284,11 +284,11 @@ class OrdersClient:
|
|
|
284
284
|
client = Paid(
|
|
285
285
|
token="YOUR_TOKEN",
|
|
286
286
|
)
|
|
287
|
-
client.orders.
|
|
287
|
+
client.orders.delete_order_by_id(
|
|
288
288
|
id="id",
|
|
289
289
|
)
|
|
290
290
|
"""
|
|
291
|
-
_response = self._raw_client.
|
|
291
|
+
_response = self._raw_client.delete_order_by_id(id, request_options=request_options)
|
|
292
292
|
return _response.data
|
|
293
293
|
|
|
294
294
|
def get_order_lines(
|
|
@@ -300,7 +300,7 @@ class OrdersClient:
|
|
|
300
300
|
request_options: typing.Optional[RequestOptions] = None,
|
|
301
301
|
) -> OrderLinesResponse:
|
|
302
302
|
"""
|
|
303
|
-
Get the order lines for an order by
|
|
303
|
+
Get the order lines for an order by ID
|
|
304
304
|
|
|
305
305
|
Parameters
|
|
306
306
|
----------
|
|
@@ -392,7 +392,7 @@ class AsyncOrdersClient:
|
|
|
392
392
|
_response = await self._raw_client.list_orders(limit=limit, offset=offset, request_options=request_options)
|
|
393
393
|
return _response.data
|
|
394
394
|
|
|
395
|
-
async def
|
|
395
|
+
async def create_order(
|
|
396
396
|
self,
|
|
397
397
|
*,
|
|
398
398
|
customer_id: str,
|
|
@@ -458,14 +458,14 @@ class AsyncOrdersClient:
|
|
|
458
458
|
|
|
459
459
|
|
|
460
460
|
async def main() -> None:
|
|
461
|
-
await client.orders.
|
|
461
|
+
await client.orders.create_order(
|
|
462
462
|
customer_id="customerId",
|
|
463
463
|
)
|
|
464
464
|
|
|
465
465
|
|
|
466
466
|
asyncio.run(main())
|
|
467
467
|
"""
|
|
468
|
-
_response = await self._raw_client.
|
|
468
|
+
_response = await self._raw_client.create_order(
|
|
469
469
|
customer_id=customer_id,
|
|
470
470
|
billing_customer_id=billing_customer_id,
|
|
471
471
|
billing_contact_ids=billing_contact_ids,
|
|
@@ -482,9 +482,9 @@ class AsyncOrdersClient:
|
|
|
482
482
|
)
|
|
483
483
|
return _response.data
|
|
484
484
|
|
|
485
|
-
async def
|
|
485
|
+
async def get_order_by_id(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Order:
|
|
486
486
|
"""
|
|
487
|
-
Get an order by
|
|
487
|
+
Get an order by ID
|
|
488
488
|
|
|
489
489
|
Parameters
|
|
490
490
|
----------
|
|
@@ -510,17 +510,17 @@ class AsyncOrdersClient:
|
|
|
510
510
|
|
|
511
511
|
|
|
512
512
|
async def main() -> None:
|
|
513
|
-
await client.orders.
|
|
513
|
+
await client.orders.get_order_by_id(
|
|
514
514
|
id="id",
|
|
515
515
|
)
|
|
516
516
|
|
|
517
517
|
|
|
518
518
|
asyncio.run(main())
|
|
519
519
|
"""
|
|
520
|
-
_response = await self._raw_client.
|
|
520
|
+
_response = await self._raw_client.get_order_by_id(id, request_options=request_options)
|
|
521
521
|
return _response.data
|
|
522
522
|
|
|
523
|
-
async def
|
|
523
|
+
async def update_order_by_id(
|
|
524
524
|
self,
|
|
525
525
|
id: str,
|
|
526
526
|
*,
|
|
@@ -538,7 +538,7 @@ class AsyncOrdersClient:
|
|
|
538
538
|
request_options: typing.Optional[RequestOptions] = None,
|
|
539
539
|
) -> Order:
|
|
540
540
|
"""
|
|
541
|
-
Update an order by
|
|
541
|
+
Update an order by ID
|
|
542
542
|
|
|
543
543
|
Parameters
|
|
544
544
|
----------
|
|
@@ -586,14 +586,14 @@ class AsyncOrdersClient:
|
|
|
586
586
|
|
|
587
587
|
|
|
588
588
|
async def main() -> None:
|
|
589
|
-
await client.orders.
|
|
589
|
+
await client.orders.update_order_by_id(
|
|
590
590
|
id="id",
|
|
591
591
|
)
|
|
592
592
|
|
|
593
593
|
|
|
594
594
|
asyncio.run(main())
|
|
595
595
|
"""
|
|
596
|
-
_response = await self._raw_client.
|
|
596
|
+
_response = await self._raw_client.update_order_by_id(
|
|
597
597
|
id,
|
|
598
598
|
name=name,
|
|
599
599
|
start_date=start_date,
|
|
@@ -610,9 +610,11 @@ class AsyncOrdersClient:
|
|
|
610
610
|
)
|
|
611
611
|
return _response.data
|
|
612
612
|
|
|
613
|
-
async def
|
|
613
|
+
async def delete_order_by_id(
|
|
614
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
615
|
+
) -> EmptyResponse:
|
|
614
616
|
"""
|
|
615
|
-
Delete an order by
|
|
617
|
+
Delete an order by ID
|
|
616
618
|
|
|
617
619
|
Parameters
|
|
618
620
|
----------
|
|
@@ -638,14 +640,14 @@ class AsyncOrdersClient:
|
|
|
638
640
|
|
|
639
641
|
|
|
640
642
|
async def main() -> None:
|
|
641
|
-
await client.orders.
|
|
643
|
+
await client.orders.delete_order_by_id(
|
|
642
644
|
id="id",
|
|
643
645
|
)
|
|
644
646
|
|
|
645
647
|
|
|
646
648
|
asyncio.run(main())
|
|
647
649
|
"""
|
|
648
|
-
_response = await self._raw_client.
|
|
650
|
+
_response = await self._raw_client.delete_order_by_id(id, request_options=request_options)
|
|
649
651
|
return _response.data
|
|
650
652
|
|
|
651
653
|
async def get_order_lines(
|
|
@@ -657,7 +659,7 @@ class AsyncOrdersClient:
|
|
|
657
659
|
request_options: typing.Optional[RequestOptions] = None,
|
|
658
660
|
) -> OrderLinesResponse:
|
|
659
661
|
"""
|
|
660
|
-
Get the order lines for an order by
|
|
662
|
+
Get the order lines for an order by ID
|
|
661
663
|
|
|
662
664
|
Parameters
|
|
663
665
|
----------
|