crypticorn 2.2.1__py3-none-any.whl → 2.2.3__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.
- crypticorn/auth/client/models/authorize_user_request.py +10 -4
- crypticorn/auth/client/models/create_api_key_request.py +19 -19
- crypticorn/auth/client/models/get_api_keys200_response_inner.py +18 -10
- crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +11 -7
- crypticorn/auth/client/models/verify200_response.py +15 -9
- crypticorn/auth/client/models/verify_email200_response_auth_auth.py +15 -9
- crypticorn/client.py +17 -10
- crypticorn/common/__init__.py +2 -1
- crypticorn/common/auth.py +1 -0
- crypticorn/common/errors.py +63 -16
- crypticorn/common/pydantic.py +14 -8
- crypticorn/common/scopes.py +3 -3
- crypticorn/common/sorter.py +8 -6
- crypticorn/common/urls.py +2 -0
- crypticorn/klines/client/configuration.py +1 -3
- crypticorn/metrics/__init__.py +3 -1
- crypticorn/metrics/main.py +6 -5
- crypticorn/pay/client/__init__.py +3 -0
- crypticorn/pay/client/api/now_payments_api.py +3 -3
- crypticorn/pay/client/api/payments_api.py +47 -19
- crypticorn/pay/client/api/products_api.py +72 -63
- crypticorn/pay/client/models/__init__.py +3 -0
- crypticorn/pay/client/models/now_webhook_payload.py +1 -1
- crypticorn/pay/client/models/partial_product_update_model.py +150 -0
- crypticorn/pay/client/models/product_update_model.py +150 -0
- crypticorn/trade/client/api/api_keys_api.py +50 -50
- crypticorn/trade/client/api/bots_api.py +3 -3
- crypticorn/trade/client/api/futures_trading_panel_api.py +15 -15
- {crypticorn-2.2.1.dist-info → crypticorn-2.2.3.dist-info}/METADATA +1 -1
- {crypticorn-2.2.1.dist-info → crypticorn-2.2.3.dist-info}/RECORD +32 -30
- {crypticorn-2.2.1.dist-info → crypticorn-2.2.3.dist-info}/WHEEL +0 -0
- {crypticorn-2.2.1.dist-info → crypticorn-2.2.3.dist-info}/top_level.txt +0 -0
crypticorn/metrics/__init__.py
CHANGED
crypticorn/metrics/main.py
CHANGED
@@ -38,7 +38,6 @@ class MetricsClient:
|
|
38
38
|
self.exchanges = ExchangesApi(self.base_client)
|
39
39
|
|
40
40
|
|
41
|
-
|
42
41
|
class MarketcapApiWrapper(MarketcapApi):
|
43
42
|
"""
|
44
43
|
A wrapper for the MarketcapApi class.
|
@@ -77,8 +76,8 @@ class MarketcapApiWrapper(MarketcapApi):
|
|
77
76
|
)
|
78
77
|
json_response = await response.json()
|
79
78
|
df = pd.DataFrame(json_response["data"])
|
80
|
-
df.rename(columns={df.columns[0]:
|
81
|
-
df[
|
79
|
+
df.rename(columns={df.columns[0]: "timestamp"}, inplace=True)
|
80
|
+
df["timestamp"] = pd.to_datetime(df["timestamp"]).astype("int64") // 10**9
|
82
81
|
return df
|
83
82
|
|
84
83
|
|
@@ -97,6 +96,8 @@ class TokensApiWrapper(TokensApi):
|
|
97
96
|
"""
|
98
97
|
Get the tokens in a pandas dataframe
|
99
98
|
"""
|
100
|
-
response = await self.get_stable_and_wrapped_tokens_without_preload_content(
|
99
|
+
response = await self.get_stable_and_wrapped_tokens_without_preload_content(
|
100
|
+
token_type=token_type
|
101
|
+
)
|
101
102
|
json_data = await response.json()
|
102
|
-
return pd.DataFrame(json_data[
|
103
|
+
return pd.DataFrame(json_data["data"])
|
@@ -41,6 +41,9 @@ from crypticorn.pay.client.models.now_create_invoice_res import NowCreateInvoice
|
|
41
41
|
from crypticorn.pay.client.models.now_fee_structure import NowFeeStructure
|
42
42
|
from crypticorn.pay.client.models.now_payment_status import NowPaymentStatus
|
43
43
|
from crypticorn.pay.client.models.now_webhook_payload import NowWebhookPayload
|
44
|
+
from crypticorn.pay.client.models.partial_product_update_model import (
|
45
|
+
PartialProductUpdateModel,
|
46
|
+
)
|
44
47
|
from crypticorn.pay.client.models.payment_status import PaymentStatus
|
45
48
|
from crypticorn.pay.client.models.product_model import ProductModel
|
46
49
|
from crypticorn.pay.client.models.product_subs_model import ProductSubsModel
|
@@ -313,7 +313,7 @@ class NOWPaymentsApi:
|
|
313
313
|
) -> NowAPIStatusRes:
|
314
314
|
"""Get Status
|
315
315
|
|
316
|
-
Get NOWPayments API
|
316
|
+
Get the status of the NOWPayments API
|
317
317
|
|
318
318
|
:param _request_timeout: timeout setting for this request. If one
|
319
319
|
number provided, it will be total request
|
@@ -373,7 +373,7 @@ class NOWPaymentsApi:
|
|
373
373
|
) -> ApiResponse[NowAPIStatusRes]:
|
374
374
|
"""Get Status
|
375
375
|
|
376
|
-
Get NOWPayments API
|
376
|
+
Get the status of the NOWPayments API
|
377
377
|
|
378
378
|
:param _request_timeout: timeout setting for this request. If one
|
379
379
|
number provided, it will be total request
|
@@ -433,7 +433,7 @@ class NOWPaymentsApi:
|
|
433
433
|
) -> RESTResponseType:
|
434
434
|
"""Get Status
|
435
435
|
|
436
|
-
Get NOWPayments API
|
436
|
+
Get the status of the NOWPayments API
|
437
437
|
|
438
438
|
:param _request_timeout: timeout setting for this request. If one
|
439
439
|
number provided, it will be total request
|
@@ -16,8 +16,9 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
17
|
from typing_extensions import Annotated
|
18
18
|
|
19
|
-
from pydantic import StrictStr
|
19
|
+
from pydantic import Field, StrictStr
|
20
20
|
from typing import List, Optional
|
21
|
+
from typing_extensions import Annotated
|
21
22
|
from crypticorn.pay.client.models.product_subs_model import ProductSubsModel
|
22
23
|
from crypticorn.pay.client.models.unified_payment_model import UnifiedPaymentModel
|
23
24
|
|
@@ -41,7 +42,10 @@ class PaymentsApi:
|
|
41
42
|
@validate_call
|
42
43
|
async def get_latest_payment_from_invoice(
|
43
44
|
self,
|
44
|
-
invoice_id:
|
45
|
+
invoice_id: Annotated[
|
46
|
+
StrictStr,
|
47
|
+
Field(description="The invoice ID to get the latest payment from"),
|
48
|
+
],
|
45
49
|
_request_timeout: Union[
|
46
50
|
None,
|
47
51
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -56,9 +60,9 @@ class PaymentsApi:
|
|
56
60
|
) -> UnifiedPaymentModel:
|
57
61
|
"""Get Latest Payment From Invoice
|
58
62
|
|
59
|
-
Get the latest payment from an invoice
|
63
|
+
Get the latest payment by a user from an invoice
|
60
64
|
|
61
|
-
:param invoice_id: (required)
|
65
|
+
:param invoice_id: The invoice ID to get the latest payment from (required)
|
62
66
|
:type invoice_id: str
|
63
67
|
:param _request_timeout: timeout setting for this request. If one
|
64
68
|
number provided, it will be total request
|
@@ -106,7 +110,10 @@ class PaymentsApi:
|
|
106
110
|
@validate_call
|
107
111
|
async def get_latest_payment_from_invoice_with_http_info(
|
108
112
|
self,
|
109
|
-
invoice_id:
|
113
|
+
invoice_id: Annotated[
|
114
|
+
StrictStr,
|
115
|
+
Field(description="The invoice ID to get the latest payment from"),
|
116
|
+
],
|
110
117
|
_request_timeout: Union[
|
111
118
|
None,
|
112
119
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -121,9 +128,9 @@ class PaymentsApi:
|
|
121
128
|
) -> ApiResponse[UnifiedPaymentModel]:
|
122
129
|
"""Get Latest Payment From Invoice
|
123
130
|
|
124
|
-
Get the latest payment from an invoice
|
131
|
+
Get the latest payment by a user from an invoice
|
125
132
|
|
126
|
-
:param invoice_id: (required)
|
133
|
+
:param invoice_id: The invoice ID to get the latest payment from (required)
|
127
134
|
:type invoice_id: str
|
128
135
|
:param _request_timeout: timeout setting for this request. If one
|
129
136
|
number provided, it will be total request
|
@@ -171,7 +178,10 @@ class PaymentsApi:
|
|
171
178
|
@validate_call
|
172
179
|
async def get_latest_payment_from_invoice_without_preload_content(
|
173
180
|
self,
|
174
|
-
invoice_id:
|
181
|
+
invoice_id: Annotated[
|
182
|
+
StrictStr,
|
183
|
+
Field(description="The invoice ID to get the latest payment from"),
|
184
|
+
],
|
175
185
|
_request_timeout: Union[
|
176
186
|
None,
|
177
187
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -186,9 +196,9 @@ class PaymentsApi:
|
|
186
196
|
) -> RESTResponseType:
|
187
197
|
"""Get Latest Payment From Invoice
|
188
198
|
|
189
|
-
Get the latest payment from an invoice
|
199
|
+
Get the latest payment by a user from an invoice
|
190
200
|
|
191
|
-
:param invoice_id: (required)
|
201
|
+
:param invoice_id: The invoice ID to get the latest payment from (required)
|
192
202
|
:type invoice_id: str
|
193
203
|
:param _request_timeout: timeout setting for this request. If one
|
194
204
|
number provided, it will be total request
|
@@ -302,7 +312,7 @@ class PaymentsApi:
|
|
302
312
|
) -> List[UnifiedPaymentModel]:
|
303
313
|
"""Get Payments
|
304
314
|
|
305
|
-
Get combined payment history for a user across all payment services.
|
315
|
+
Get the combined payment history for a user across all payment services.
|
306
316
|
|
307
317
|
:param _request_timeout: timeout setting for this request. If one
|
308
318
|
number provided, it will be total request
|
@@ -362,7 +372,7 @@ class PaymentsApi:
|
|
362
372
|
) -> ApiResponse[List[UnifiedPaymentModel]]:
|
363
373
|
"""Get Payments
|
364
374
|
|
365
|
-
Get combined payment history for a user across all payment services.
|
375
|
+
Get the combined payment history for a user across all payment services.
|
366
376
|
|
367
377
|
:param _request_timeout: timeout setting for this request. If one
|
368
378
|
number provided, it will be total request
|
@@ -422,7 +432,7 @@ class PaymentsApi:
|
|
422
432
|
) -> RESTResponseType:
|
423
433
|
"""Get Payments
|
424
434
|
|
425
|
-
Get combined payment history for a user across all payment services.
|
435
|
+
Get the combined payment history for a user across all payment services.
|
426
436
|
|
427
437
|
:param _request_timeout: timeout setting for this request. If one
|
428
438
|
number provided, it will be total request
|
@@ -515,7 +525,12 @@ class PaymentsApi:
|
|
515
525
|
@validate_call
|
516
526
|
async def get_subscriptions(
|
517
527
|
self,
|
518
|
-
user_id:
|
528
|
+
user_id: Annotated[
|
529
|
+
Optional[StrictStr],
|
530
|
+
Field(
|
531
|
+
description="The user ID to get subscriptions for. Defaults to the authenticated user."
|
532
|
+
),
|
533
|
+
] = None,
|
519
534
|
_request_timeout: Union[
|
520
535
|
None,
|
521
536
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -530,8 +545,9 @@ class PaymentsApi:
|
|
530
545
|
) -> List[ProductSubsModel]:
|
531
546
|
"""Get Subscriptions
|
532
547
|
|
548
|
+
Get all subscriptions for a user. Subscriptions are the products a user has subscribed to. Returns both active and inactive subscriptions.
|
533
549
|
|
534
|
-
:param user_id:
|
550
|
+
:param user_id: The user ID to get subscriptions for. Defaults to the authenticated user.
|
535
551
|
:type user_id: str
|
536
552
|
:param _request_timeout: timeout setting for this request. If one
|
537
553
|
number provided, it will be total request
|
@@ -579,7 +595,12 @@ class PaymentsApi:
|
|
579
595
|
@validate_call
|
580
596
|
async def get_subscriptions_with_http_info(
|
581
597
|
self,
|
582
|
-
user_id:
|
598
|
+
user_id: Annotated[
|
599
|
+
Optional[StrictStr],
|
600
|
+
Field(
|
601
|
+
description="The user ID to get subscriptions for. Defaults to the authenticated user."
|
602
|
+
),
|
603
|
+
] = None,
|
583
604
|
_request_timeout: Union[
|
584
605
|
None,
|
585
606
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -594,8 +615,9 @@ class PaymentsApi:
|
|
594
615
|
) -> ApiResponse[List[ProductSubsModel]]:
|
595
616
|
"""Get Subscriptions
|
596
617
|
|
618
|
+
Get all subscriptions for a user. Subscriptions are the products a user has subscribed to. Returns both active and inactive subscriptions.
|
597
619
|
|
598
|
-
:param user_id:
|
620
|
+
:param user_id: The user ID to get subscriptions for. Defaults to the authenticated user.
|
599
621
|
:type user_id: str
|
600
622
|
:param _request_timeout: timeout setting for this request. If one
|
601
623
|
number provided, it will be total request
|
@@ -643,7 +665,12 @@ class PaymentsApi:
|
|
643
665
|
@validate_call
|
644
666
|
async def get_subscriptions_without_preload_content(
|
645
667
|
self,
|
646
|
-
user_id:
|
668
|
+
user_id: Annotated[
|
669
|
+
Optional[StrictStr],
|
670
|
+
Field(
|
671
|
+
description="The user ID to get subscriptions for. Defaults to the authenticated user."
|
672
|
+
),
|
673
|
+
] = None,
|
647
674
|
_request_timeout: Union[
|
648
675
|
None,
|
649
676
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -658,8 +685,9 @@ class PaymentsApi:
|
|
658
685
|
) -> RESTResponseType:
|
659
686
|
"""Get Subscriptions
|
660
687
|
|
688
|
+
Get all subscriptions for a user. Subscriptions are the products a user has subscribed to. Returns both active and inactive subscriptions.
|
661
689
|
|
662
|
-
:param user_id:
|
690
|
+
:param user_id: The user ID to get subscriptions for. Defaults to the authenticated user.
|
663
691
|
:type user_id: str
|
664
692
|
:param _request_timeout: timeout setting for this request. If one
|
665
693
|
number provided, it will be total request
|
@@ -16,8 +16,12 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
17
|
from typing_extensions import Annotated
|
18
18
|
|
19
|
-
from pydantic import StrictInt, StrictStr
|
20
|
-
from typing import Any,
|
19
|
+
from pydantic import Field, StrictInt, StrictStr
|
20
|
+
from typing import Any, List, Optional
|
21
|
+
from typing_extensions import Annotated
|
22
|
+
from crypticorn.pay.client.models.partial_product_update_model import (
|
23
|
+
PartialProductUpdateModel,
|
24
|
+
)
|
21
25
|
from crypticorn.pay.client.models.product_model import ProductModel
|
22
26
|
|
23
27
|
from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
|
@@ -295,9 +299,18 @@ class ProductsApi:
|
|
295
299
|
@validate_call
|
296
300
|
async def get_products(
|
297
301
|
self,
|
298
|
-
limit:
|
299
|
-
|
300
|
-
|
302
|
+
limit: Annotated[
|
303
|
+
Optional[StrictInt],
|
304
|
+
Field(
|
305
|
+
description="Limit the number of products returned. 0 means no limit."
|
306
|
+
),
|
307
|
+
] = None,
|
308
|
+
offset: Annotated[
|
309
|
+
Optional[StrictInt],
|
310
|
+
Field(
|
311
|
+
description="Offset the number of products returned. 0 means no offset."
|
312
|
+
),
|
313
|
+
] = None,
|
301
314
|
_request_timeout: Union[
|
302
315
|
None,
|
303
316
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -312,14 +325,12 @@ class ProductsApi:
|
|
312
325
|
) -> List[ProductModel]:
|
313
326
|
"""Get Products
|
314
327
|
|
315
|
-
Get all products
|
328
|
+
Get all software products from Crypticorn
|
316
329
|
|
317
|
-
:param limit:
|
330
|
+
:param limit: Limit the number of products returned. 0 means no limit.
|
318
331
|
:type limit: int
|
319
|
-
:param offset:
|
332
|
+
:param offset: Offset the number of products returned. 0 means no offset.
|
320
333
|
:type offset: int
|
321
|
-
:param body:
|
322
|
-
:type body: object
|
323
334
|
:param _request_timeout: timeout setting for this request. If one
|
324
335
|
number provided, it will be total request
|
325
336
|
timeout. It can also be a pair (tuple) of
|
@@ -345,7 +356,6 @@ class ProductsApi:
|
|
345
356
|
_param = self._get_products_serialize(
|
346
357
|
limit=limit,
|
347
358
|
offset=offset,
|
348
|
-
body=body,
|
349
359
|
_request_auth=_request_auth,
|
350
360
|
_content_type=_content_type,
|
351
361
|
_headers=_headers,
|
@@ -368,9 +378,18 @@ class ProductsApi:
|
|
368
378
|
@validate_call
|
369
379
|
async def get_products_with_http_info(
|
370
380
|
self,
|
371
|
-
limit:
|
372
|
-
|
373
|
-
|
381
|
+
limit: Annotated[
|
382
|
+
Optional[StrictInt],
|
383
|
+
Field(
|
384
|
+
description="Limit the number of products returned. 0 means no limit."
|
385
|
+
),
|
386
|
+
] = None,
|
387
|
+
offset: Annotated[
|
388
|
+
Optional[StrictInt],
|
389
|
+
Field(
|
390
|
+
description="Offset the number of products returned. 0 means no offset."
|
391
|
+
),
|
392
|
+
] = None,
|
374
393
|
_request_timeout: Union[
|
375
394
|
None,
|
376
395
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -385,14 +404,12 @@ class ProductsApi:
|
|
385
404
|
) -> ApiResponse[List[ProductModel]]:
|
386
405
|
"""Get Products
|
387
406
|
|
388
|
-
Get all products
|
407
|
+
Get all software products from Crypticorn
|
389
408
|
|
390
|
-
:param limit:
|
409
|
+
:param limit: Limit the number of products returned. 0 means no limit.
|
391
410
|
:type limit: int
|
392
|
-
:param offset:
|
411
|
+
:param offset: Offset the number of products returned. 0 means no offset.
|
393
412
|
:type offset: int
|
394
|
-
:param body:
|
395
|
-
:type body: object
|
396
413
|
:param _request_timeout: timeout setting for this request. If one
|
397
414
|
number provided, it will be total request
|
398
415
|
timeout. It can also be a pair (tuple) of
|
@@ -418,7 +435,6 @@ class ProductsApi:
|
|
418
435
|
_param = self._get_products_serialize(
|
419
436
|
limit=limit,
|
420
437
|
offset=offset,
|
421
|
-
body=body,
|
422
438
|
_request_auth=_request_auth,
|
423
439
|
_content_type=_content_type,
|
424
440
|
_headers=_headers,
|
@@ -441,9 +457,18 @@ class ProductsApi:
|
|
441
457
|
@validate_call
|
442
458
|
async def get_products_without_preload_content(
|
443
459
|
self,
|
444
|
-
limit:
|
445
|
-
|
446
|
-
|
460
|
+
limit: Annotated[
|
461
|
+
Optional[StrictInt],
|
462
|
+
Field(
|
463
|
+
description="Limit the number of products returned. 0 means no limit."
|
464
|
+
),
|
465
|
+
] = None,
|
466
|
+
offset: Annotated[
|
467
|
+
Optional[StrictInt],
|
468
|
+
Field(
|
469
|
+
description="Offset the number of products returned. 0 means no offset."
|
470
|
+
),
|
471
|
+
] = None,
|
447
472
|
_request_timeout: Union[
|
448
473
|
None,
|
449
474
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -458,14 +483,12 @@ class ProductsApi:
|
|
458
483
|
) -> RESTResponseType:
|
459
484
|
"""Get Products
|
460
485
|
|
461
|
-
Get all products
|
486
|
+
Get all software products from Crypticorn
|
462
487
|
|
463
|
-
:param limit:
|
488
|
+
:param limit: Limit the number of products returned. 0 means no limit.
|
464
489
|
:type limit: int
|
465
|
-
:param offset:
|
490
|
+
:param offset: Offset the number of products returned. 0 means no offset.
|
466
491
|
:type offset: int
|
467
|
-
:param body:
|
468
|
-
:type body: object
|
469
492
|
:param _request_timeout: timeout setting for this request. If one
|
470
493
|
number provided, it will be total request
|
471
494
|
timeout. It can also be a pair (tuple) of
|
@@ -491,7 +514,6 @@ class ProductsApi:
|
|
491
514
|
_param = self._get_products_serialize(
|
492
515
|
limit=limit,
|
493
516
|
offset=offset,
|
494
|
-
body=body,
|
495
517
|
_request_auth=_request_auth,
|
496
518
|
_content_type=_content_type,
|
497
519
|
_headers=_headers,
|
@@ -511,7 +533,6 @@ class ProductsApi:
|
|
511
533
|
self,
|
512
534
|
limit,
|
513
535
|
offset,
|
514
|
-
body,
|
515
536
|
_request_auth,
|
516
537
|
_content_type,
|
517
538
|
_headers,
|
@@ -544,8 +565,6 @@ class ProductsApi:
|
|
544
565
|
# process the header parameters
|
545
566
|
# process the form parameters
|
546
567
|
# process the body parameter
|
547
|
-
if body is not None:
|
548
|
-
_body_params = body
|
549
568
|
|
550
569
|
# set the HTTP header `Accept`
|
551
570
|
if "Accept" not in _header_params:
|
@@ -553,16 +572,6 @@ class ProductsApi:
|
|
553
572
|
["application/json"]
|
554
573
|
)
|
555
574
|
|
556
|
-
# set the HTTP header `Content-Type`
|
557
|
-
if _content_type:
|
558
|
-
_header_params["Content-Type"] = _content_type
|
559
|
-
else:
|
560
|
-
_default_content_type = self.api_client.select_header_content_type(
|
561
|
-
["application/json"]
|
562
|
-
)
|
563
|
-
if _default_content_type is not None:
|
564
|
-
_header_params["Content-Type"] = _default_content_type
|
565
|
-
|
566
575
|
# authentication setting
|
567
576
|
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
568
577
|
|
@@ -584,8 +593,8 @@ class ProductsApi:
|
|
584
593
|
@validate_call
|
585
594
|
async def update_product(
|
586
595
|
self,
|
587
|
-
id: StrictStr,
|
588
|
-
|
596
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
597
|
+
partial_product_update_model: PartialProductUpdateModel,
|
589
598
|
_request_timeout: Union[
|
590
599
|
None,
|
591
600
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -602,10 +611,10 @@ class ProductsApi:
|
|
602
611
|
|
603
612
|
Update an existing product
|
604
613
|
|
605
|
-
:param id: (required)
|
614
|
+
:param id: The ID of the product to update (required)
|
606
615
|
:type id: str
|
607
|
-
:param
|
608
|
-
:type
|
616
|
+
:param partial_product_update_model: (required)
|
617
|
+
:type partial_product_update_model: PartialProductUpdateModel
|
609
618
|
:param _request_timeout: timeout setting for this request. If one
|
610
619
|
number provided, it will be total request
|
611
620
|
timeout. It can also be a pair (tuple) of
|
@@ -630,7 +639,7 @@ class ProductsApi:
|
|
630
639
|
|
631
640
|
_param = self._update_product_serialize(
|
632
641
|
id=id,
|
633
|
-
|
642
|
+
partial_product_update_model=partial_product_update_model,
|
634
643
|
_request_auth=_request_auth,
|
635
644
|
_content_type=_content_type,
|
636
645
|
_headers=_headers,
|
@@ -653,8 +662,8 @@ class ProductsApi:
|
|
653
662
|
@validate_call
|
654
663
|
async def update_product_with_http_info(
|
655
664
|
self,
|
656
|
-
id: StrictStr,
|
657
|
-
|
665
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
666
|
+
partial_product_update_model: PartialProductUpdateModel,
|
658
667
|
_request_timeout: Union[
|
659
668
|
None,
|
660
669
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -671,10 +680,10 @@ class ProductsApi:
|
|
671
680
|
|
672
681
|
Update an existing product
|
673
682
|
|
674
|
-
:param id: (required)
|
683
|
+
:param id: The ID of the product to update (required)
|
675
684
|
:type id: str
|
676
|
-
:param
|
677
|
-
:type
|
685
|
+
:param partial_product_update_model: (required)
|
686
|
+
:type partial_product_update_model: PartialProductUpdateModel
|
678
687
|
:param _request_timeout: timeout setting for this request. If one
|
679
688
|
number provided, it will be total request
|
680
689
|
timeout. It can also be a pair (tuple) of
|
@@ -699,7 +708,7 @@ class ProductsApi:
|
|
699
708
|
|
700
709
|
_param = self._update_product_serialize(
|
701
710
|
id=id,
|
702
|
-
|
711
|
+
partial_product_update_model=partial_product_update_model,
|
703
712
|
_request_auth=_request_auth,
|
704
713
|
_content_type=_content_type,
|
705
714
|
_headers=_headers,
|
@@ -722,8 +731,8 @@ class ProductsApi:
|
|
722
731
|
@validate_call
|
723
732
|
async def update_product_without_preload_content(
|
724
733
|
self,
|
725
|
-
id: StrictStr,
|
726
|
-
|
734
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
735
|
+
partial_product_update_model: PartialProductUpdateModel,
|
727
736
|
_request_timeout: Union[
|
728
737
|
None,
|
729
738
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -740,10 +749,10 @@ class ProductsApi:
|
|
740
749
|
|
741
750
|
Update an existing product
|
742
751
|
|
743
|
-
:param id: (required)
|
752
|
+
:param id: The ID of the product to update (required)
|
744
753
|
:type id: str
|
745
|
-
:param
|
746
|
-
:type
|
754
|
+
:param partial_product_update_model: (required)
|
755
|
+
:type partial_product_update_model: PartialProductUpdateModel
|
747
756
|
:param _request_timeout: timeout setting for this request. If one
|
748
757
|
number provided, it will be total request
|
749
758
|
timeout. It can also be a pair (tuple) of
|
@@ -768,7 +777,7 @@ class ProductsApi:
|
|
768
777
|
|
769
778
|
_param = self._update_product_serialize(
|
770
779
|
id=id,
|
771
|
-
|
780
|
+
partial_product_update_model=partial_product_update_model,
|
772
781
|
_request_auth=_request_auth,
|
773
782
|
_content_type=_content_type,
|
774
783
|
_headers=_headers,
|
@@ -787,7 +796,7 @@ class ProductsApi:
|
|
787
796
|
def _update_product_serialize(
|
788
797
|
self,
|
789
798
|
id,
|
790
|
-
|
799
|
+
partial_product_update_model,
|
791
800
|
_request_auth,
|
792
801
|
_content_type,
|
793
802
|
_headers,
|
@@ -814,8 +823,8 @@ class ProductsApi:
|
|
814
823
|
# process the header parameters
|
815
824
|
# process the form parameters
|
816
825
|
# process the body parameter
|
817
|
-
if
|
818
|
-
_body_params =
|
826
|
+
if partial_product_update_model is not None:
|
827
|
+
_body_params = partial_product_update_model
|
819
828
|
|
820
829
|
# set the HTTP header `Accept`
|
821
830
|
if "Accept" not in _header_params:
|
@@ -21,6 +21,9 @@ from crypticorn.pay.client.models.now_create_invoice_res import NowCreateInvoice
|
|
21
21
|
from crypticorn.pay.client.models.now_fee_structure import NowFeeStructure
|
22
22
|
from crypticorn.pay.client.models.now_payment_status import NowPaymentStatus
|
23
23
|
from crypticorn.pay.client.models.now_webhook_payload import NowWebhookPayload
|
24
|
+
from crypticorn.pay.client.models.partial_product_update_model import (
|
25
|
+
PartialProductUpdateModel,
|
26
|
+
)
|
24
27
|
from crypticorn.pay.client.models.payment_status import PaymentStatus
|
25
28
|
from crypticorn.pay.client.models.product_model import ProductModel
|
26
29
|
from crypticorn.pay.client.models.product_subs_model import ProductSubsModel
|
@@ -36,7 +36,7 @@ class NowWebhookPayload(BaseModel):
|
|
36
36
|
actually_paid_at_fiat: Union[StrictFloat, StrictInt] = Field(
|
37
37
|
description="Actually paid amount in fiat currency"
|
38
38
|
)
|
39
|
-
fee: NowFeeStructure
|
39
|
+
fee: NowFeeStructure
|
40
40
|
invoice_id: StrictInt = Field(description="Associated invoice ID")
|
41
41
|
order_description: StrictStr = Field(description="Order description")
|
42
42
|
order_id: StrictStr = Field(description="Internal order ID")
|