crypticorn 2.4.5__py3-none-any.whl → 2.4.6__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/client.py +1 -1
- crypticorn/common/errors.py +1 -1
- crypticorn/common/scopes.py +2 -1
- crypticorn/metrics/client/models/exchange_mapping.py +4 -2
- crypticorn/metrics/client/models/trading_status.py +1 -0
- crypticorn/pay/client/__init__.py +5 -4
- crypticorn/pay/client/api/payments_api.py +17 -17
- crypticorn/pay/client/api/products_api.py +49 -48
- crypticorn/pay/client/models/__init__.py +5 -4
- crypticorn/pay/client/models/payment.py +28 -147
- crypticorn/pay/client/models/product_create.py +120 -0
- crypticorn/pay/client/models/product_read.py +123 -0
- crypticorn/pay/client/models/product_sub_read.py +103 -0
- crypticorn/pay/client/models/product_update.py +142 -0
- {crypticorn-2.4.5.dist-info → crypticorn-2.4.6.dist-info}/METADATA +6 -1
- {crypticorn-2.4.5.dist-info → crypticorn-2.4.6.dist-info}/RECORD +19 -15
- {crypticorn-2.4.5.dist-info → crypticorn-2.4.6.dist-info}/WHEEL +0 -0
- {crypticorn-2.4.5.dist-info → crypticorn-2.4.6.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.4.5.dist-info → crypticorn-2.4.6.dist-info}/top_level.txt +0 -0
crypticorn/client.py
CHANGED
crypticorn/common/errors.py
CHANGED
@@ -7,7 +7,7 @@ logger = logging.getLogger(__name__)
|
|
7
7
|
|
8
8
|
class Fallback(EnumMeta):
|
9
9
|
"""Fallback to UNKNOWN_ERROR for error codes not yet published to PyPI."""
|
10
|
-
|
10
|
+
|
11
11
|
def __getattr__(cls, name):
|
12
12
|
# Let Pydantic/internal stuff pass silently ! fragile
|
13
13
|
if name.startswith("__"):
|
crypticorn/common/scopes.py
CHANGED
@@ -6,6 +6,7 @@ logger = logging.getLogger("uvicorn")
|
|
6
6
|
|
7
7
|
class Fallback(EnumMeta):
|
8
8
|
"""Fallback to no scope for unknown scopes."""
|
9
|
+
|
9
10
|
# Note: This is a workaround to avoid the AttributeError when an unknown scope is accessed.
|
10
11
|
# As soon as we have stable scopes, we can remove this.
|
11
12
|
|
@@ -19,7 +20,7 @@ class Fallback(EnumMeta):
|
|
19
20
|
return None
|
20
21
|
|
21
22
|
|
22
|
-
class Scope(StrEnum
|
23
|
+
class Scope(StrEnum):
|
23
24
|
"""
|
24
25
|
The permission scopes for the API.
|
25
26
|
"""
|
@@ -20,6 +20,8 @@ import json
|
|
20
20
|
from datetime import datetime
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from crypticorn.metrics.client.models.market_type import MarketType
|
24
|
+
from crypticorn.metrics.client.models.trading_status import TradingStatus
|
23
25
|
from typing import Optional, Set
|
24
26
|
from typing_extensions import Self
|
25
27
|
|
@@ -35,8 +37,8 @@ class ExchangeMapping(BaseModel):
|
|
35
37
|
pair: StrictStr
|
36
38
|
first_trade_timestamp: Optional[datetime]
|
37
39
|
last_trade_timestamp: Optional[datetime]
|
38
|
-
status:
|
39
|
-
market_type: Optional[
|
40
|
+
status: TradingStatus
|
41
|
+
market_type: Optional[MarketType]
|
40
42
|
__properties: ClassVar[List[str]] = [
|
41
43
|
"exchange_name",
|
42
44
|
"symbol",
|
@@ -41,13 +41,14 @@ 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.payment import Payment
|
44
45
|
from crypticorn.pay.client.models.payment_status import PaymentStatus
|
45
|
-
from crypticorn.pay.client.models.
|
46
|
-
from crypticorn.pay.client.models.
|
47
|
-
from crypticorn.pay.client.models.
|
46
|
+
from crypticorn.pay.client.models.product_create import ProductCreate
|
47
|
+
from crypticorn.pay.client.models.product_read import ProductRead
|
48
|
+
from crypticorn.pay.client.models.product_sub_read import ProductSubRead
|
49
|
+
from crypticorn.pay.client.models.product_update import ProductUpdate
|
48
50
|
from crypticorn.pay.client.models.scope import Scope
|
49
51
|
from crypticorn.pay.client.models.services import Services
|
50
|
-
from crypticorn.pay.client.models.unified_payment_model import UnifiedPaymentModel
|
51
52
|
from crypticorn.pay.client.models.validation_error import ValidationError
|
52
53
|
from crypticorn.pay.client.models.validation_error_loc_inner import (
|
53
54
|
ValidationErrorLocInner,
|
@@ -19,8 +19,8 @@ from typing_extensions import Annotated
|
|
19
19
|
from pydantic import Field, StrictInt, StrictStr
|
20
20
|
from typing import List, Optional
|
21
21
|
from typing_extensions import Annotated
|
22
|
-
from crypticorn.pay.client.models.
|
23
|
-
from crypticorn.pay.client.models.
|
22
|
+
from crypticorn.pay.client.models.payment import Payment
|
23
|
+
from crypticorn.pay.client.models.product_sub_read import ProductSubRead
|
24
24
|
|
25
25
|
from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
|
26
26
|
from crypticorn.pay.client.api_response import ApiResponse
|
@@ -57,7 +57,7 @@ class PaymentsApi:
|
|
57
57
|
_content_type: Optional[StrictStr] = None,
|
58
58
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
59
59
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
60
|
-
) ->
|
60
|
+
) -> Payment:
|
61
61
|
"""Get Latest Payment From Invoice
|
62
62
|
|
63
63
|
Get the latest payment by a user from an invoice
|
@@ -95,7 +95,7 @@ class PaymentsApi:
|
|
95
95
|
)
|
96
96
|
|
97
97
|
_response_types_map: Dict[str, Optional[str]] = {
|
98
|
-
"200": "
|
98
|
+
"200": "Payment",
|
99
99
|
"422": "HTTPValidationError",
|
100
100
|
}
|
101
101
|
response_data = await self.api_client.call_api(
|
@@ -125,7 +125,7 @@ class PaymentsApi:
|
|
125
125
|
_content_type: Optional[StrictStr] = None,
|
126
126
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
127
127
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
128
|
-
) -> ApiResponse[
|
128
|
+
) -> ApiResponse[Payment]:
|
129
129
|
"""Get Latest Payment From Invoice
|
130
130
|
|
131
131
|
Get the latest payment by a user from an invoice
|
@@ -163,7 +163,7 @@ class PaymentsApi:
|
|
163
163
|
)
|
164
164
|
|
165
165
|
_response_types_map: Dict[str, Optional[str]] = {
|
166
|
-
"200": "
|
166
|
+
"200": "Payment",
|
167
167
|
"422": "HTTPValidationError",
|
168
168
|
}
|
169
169
|
response_data = await self.api_client.call_api(
|
@@ -231,7 +231,7 @@ class PaymentsApi:
|
|
231
231
|
)
|
232
232
|
|
233
233
|
_response_types_map: Dict[str, Optional[str]] = {
|
234
|
-
"200": "
|
234
|
+
"200": "Payment",
|
235
235
|
"422": "HTTPValidationError",
|
236
236
|
}
|
237
237
|
response_data = await self.api_client.call_api(
|
@@ -321,7 +321,7 @@ class PaymentsApi:
|
|
321
321
|
_content_type: Optional[StrictStr] = None,
|
322
322
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
323
323
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
324
|
-
) -> List[
|
324
|
+
) -> List[Payment]:
|
325
325
|
"""Get Payments
|
326
326
|
|
327
327
|
Get the combined payment history for a user across all payment services.
|
@@ -362,7 +362,7 @@ class PaymentsApi:
|
|
362
362
|
)
|
363
363
|
|
364
364
|
_response_types_map: Dict[str, Optional[str]] = {
|
365
|
-
"200": "List[
|
365
|
+
"200": "List[Payment]",
|
366
366
|
"422": "HTTPValidationError",
|
367
367
|
}
|
368
368
|
response_data = await self.api_client.call_api(
|
@@ -400,7 +400,7 @@ class PaymentsApi:
|
|
400
400
|
_content_type: Optional[StrictStr] = None,
|
401
401
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
402
402
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
403
|
-
) -> ApiResponse[List[
|
403
|
+
) -> ApiResponse[List[Payment]]:
|
404
404
|
"""Get Payments
|
405
405
|
|
406
406
|
Get the combined payment history for a user across all payment services.
|
@@ -441,7 +441,7 @@ class PaymentsApi:
|
|
441
441
|
)
|
442
442
|
|
443
443
|
_response_types_map: Dict[str, Optional[str]] = {
|
444
|
-
"200": "List[
|
444
|
+
"200": "List[Payment]",
|
445
445
|
"422": "HTTPValidationError",
|
446
446
|
}
|
447
447
|
response_data = await self.api_client.call_api(
|
@@ -520,7 +520,7 @@ class PaymentsApi:
|
|
520
520
|
)
|
521
521
|
|
522
522
|
_response_types_map: Dict[str, Optional[str]] = {
|
523
|
-
"200": "List[
|
523
|
+
"200": "List[Payment]",
|
524
524
|
"422": "HTTPValidationError",
|
525
525
|
}
|
526
526
|
response_data = await self.api_client.call_api(
|
@@ -609,7 +609,7 @@ class PaymentsApi:
|
|
609
609
|
_content_type: Optional[StrictStr] = None,
|
610
610
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
611
611
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
612
|
-
) -> List[
|
612
|
+
) -> List[ProductSubRead]:
|
613
613
|
"""Get Subscriptions
|
614
614
|
|
615
615
|
Get all subscriptions for a user. Subscriptions are the products a user has subscribed to. Returns both active and inactive subscriptions.
|
@@ -647,7 +647,7 @@ class PaymentsApi:
|
|
647
647
|
)
|
648
648
|
|
649
649
|
_response_types_map: Dict[str, Optional[str]] = {
|
650
|
-
"200": "List[
|
650
|
+
"200": "List[ProductSubRead]",
|
651
651
|
"422": "HTTPValidationError",
|
652
652
|
}
|
653
653
|
response_data = await self.api_client.call_api(
|
@@ -679,7 +679,7 @@ class PaymentsApi:
|
|
679
679
|
_content_type: Optional[StrictStr] = None,
|
680
680
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
681
681
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
682
|
-
) -> ApiResponse[List[
|
682
|
+
) -> ApiResponse[List[ProductSubRead]]:
|
683
683
|
"""Get Subscriptions
|
684
684
|
|
685
685
|
Get all subscriptions for a user. Subscriptions are the products a user has subscribed to. Returns both active and inactive subscriptions.
|
@@ -717,7 +717,7 @@ class PaymentsApi:
|
|
717
717
|
)
|
718
718
|
|
719
719
|
_response_types_map: Dict[str, Optional[str]] = {
|
720
|
-
"200": "List[
|
720
|
+
"200": "List[ProductSubRead]",
|
721
721
|
"422": "HTTPValidationError",
|
722
722
|
}
|
723
723
|
response_data = await self.api_client.call_api(
|
@@ -787,7 +787,7 @@ class PaymentsApi:
|
|
787
787
|
)
|
788
788
|
|
789
789
|
_response_types_map: Dict[str, Optional[str]] = {
|
790
|
-
"200": "List[
|
790
|
+
"200": "List[ProductSubRead]",
|
791
791
|
"422": "HTTPValidationError",
|
792
792
|
}
|
793
793
|
response_data = await self.api_client.call_api(
|
@@ -17,10 +17,11 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
18
18
|
|
19
19
|
from pydantic import Field, StrictInt, StrictStr
|
20
|
-
from typing import
|
20
|
+
from typing import List, Optional
|
21
21
|
from typing_extensions import Annotated
|
22
|
-
from crypticorn.pay.client.models.
|
23
|
-
from crypticorn.pay.client.models.
|
22
|
+
from crypticorn.pay.client.models.product_create import ProductCreate
|
23
|
+
from crypticorn.pay.client.models.product_read import ProductRead
|
24
|
+
from crypticorn.pay.client.models.product_update import ProductUpdate
|
24
25
|
|
25
26
|
from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
|
26
27
|
from crypticorn.pay.client.api_response import ApiResponse
|
@@ -42,7 +43,7 @@ class ProductsApi:
|
|
42
43
|
@validate_call
|
43
44
|
async def create_product(
|
44
45
|
self,
|
45
|
-
|
46
|
+
product_create: ProductCreate,
|
46
47
|
_request_timeout: Union[
|
47
48
|
None,
|
48
49
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -54,13 +55,13 @@ class ProductsApi:
|
|
54
55
|
_content_type: Optional[StrictStr] = None,
|
55
56
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
56
57
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
57
|
-
) ->
|
58
|
+
) -> ProductRead:
|
58
59
|
"""Create Product
|
59
60
|
|
60
61
|
Create a new product
|
61
62
|
|
62
|
-
:param
|
63
|
-
:type
|
63
|
+
:param product_create: (required)
|
64
|
+
:type product_create: ProductCreate
|
64
65
|
:param _request_timeout: timeout setting for this request. If one
|
65
66
|
number provided, it will be total request
|
66
67
|
timeout. It can also be a pair (tuple) of
|
@@ -84,7 +85,7 @@ class ProductsApi:
|
|
84
85
|
""" # noqa: E501
|
85
86
|
|
86
87
|
_param = self._create_product_serialize(
|
87
|
-
|
88
|
+
product_create=product_create,
|
88
89
|
_request_auth=_request_auth,
|
89
90
|
_content_type=_content_type,
|
90
91
|
_headers=_headers,
|
@@ -92,7 +93,7 @@ class ProductsApi:
|
|
92
93
|
)
|
93
94
|
|
94
95
|
_response_types_map: Dict[str, Optional[str]] = {
|
95
|
-
"
|
96
|
+
"201": "ProductRead",
|
96
97
|
"422": "HTTPValidationError",
|
97
98
|
}
|
98
99
|
response_data = await self.api_client.call_api(
|
@@ -107,7 +108,7 @@ class ProductsApi:
|
|
107
108
|
@validate_call
|
108
109
|
async def create_product_with_http_info(
|
109
110
|
self,
|
110
|
-
|
111
|
+
product_create: ProductCreate,
|
111
112
|
_request_timeout: Union[
|
112
113
|
None,
|
113
114
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -119,13 +120,13 @@ class ProductsApi:
|
|
119
120
|
_content_type: Optional[StrictStr] = None,
|
120
121
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
121
122
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
122
|
-
) -> ApiResponse[
|
123
|
+
) -> ApiResponse[ProductRead]:
|
123
124
|
"""Create Product
|
124
125
|
|
125
126
|
Create a new product
|
126
127
|
|
127
|
-
:param
|
128
|
-
:type
|
128
|
+
:param product_create: (required)
|
129
|
+
:type product_create: ProductCreate
|
129
130
|
:param _request_timeout: timeout setting for this request. If one
|
130
131
|
number provided, it will be total request
|
131
132
|
timeout. It can also be a pair (tuple) of
|
@@ -149,7 +150,7 @@ class ProductsApi:
|
|
149
150
|
""" # noqa: E501
|
150
151
|
|
151
152
|
_param = self._create_product_serialize(
|
152
|
-
|
153
|
+
product_create=product_create,
|
153
154
|
_request_auth=_request_auth,
|
154
155
|
_content_type=_content_type,
|
155
156
|
_headers=_headers,
|
@@ -157,7 +158,7 @@ class ProductsApi:
|
|
157
158
|
)
|
158
159
|
|
159
160
|
_response_types_map: Dict[str, Optional[str]] = {
|
160
|
-
"
|
161
|
+
"201": "ProductRead",
|
161
162
|
"422": "HTTPValidationError",
|
162
163
|
}
|
163
164
|
response_data = await self.api_client.call_api(
|
@@ -172,7 +173,7 @@ class ProductsApi:
|
|
172
173
|
@validate_call
|
173
174
|
async def create_product_without_preload_content(
|
174
175
|
self,
|
175
|
-
|
176
|
+
product_create: ProductCreate,
|
176
177
|
_request_timeout: Union[
|
177
178
|
None,
|
178
179
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -189,8 +190,8 @@ class ProductsApi:
|
|
189
190
|
|
190
191
|
Create a new product
|
191
192
|
|
192
|
-
:param
|
193
|
-
:type
|
193
|
+
:param product_create: (required)
|
194
|
+
:type product_create: ProductCreate
|
194
195
|
:param _request_timeout: timeout setting for this request. If one
|
195
196
|
number provided, it will be total request
|
196
197
|
timeout. It can also be a pair (tuple) of
|
@@ -214,7 +215,7 @@ class ProductsApi:
|
|
214
215
|
""" # noqa: E501
|
215
216
|
|
216
217
|
_param = self._create_product_serialize(
|
217
|
-
|
218
|
+
product_create=product_create,
|
218
219
|
_request_auth=_request_auth,
|
219
220
|
_content_type=_content_type,
|
220
221
|
_headers=_headers,
|
@@ -222,7 +223,7 @@ class ProductsApi:
|
|
222
223
|
)
|
223
224
|
|
224
225
|
_response_types_map: Dict[str, Optional[str]] = {
|
225
|
-
"
|
226
|
+
"201": "ProductRead",
|
226
227
|
"422": "HTTPValidationError",
|
227
228
|
}
|
228
229
|
response_data = await self.api_client.call_api(
|
@@ -232,7 +233,7 @@ class ProductsApi:
|
|
232
233
|
|
233
234
|
def _create_product_serialize(
|
234
235
|
self,
|
235
|
-
|
236
|
+
product_create,
|
236
237
|
_request_auth,
|
237
238
|
_content_type,
|
238
239
|
_headers,
|
@@ -257,8 +258,8 @@ class ProductsApi:
|
|
257
258
|
# process the header parameters
|
258
259
|
# process the form parameters
|
259
260
|
# process the body parameter
|
260
|
-
if
|
261
|
-
_body_params =
|
261
|
+
if product_create is not None:
|
262
|
+
_body_params = product_create
|
262
263
|
|
263
264
|
# set the HTTP header `Accept`
|
264
265
|
if "Accept" not in _header_params:
|
@@ -320,7 +321,7 @@ class ProductsApi:
|
|
320
321
|
_content_type: Optional[StrictStr] = None,
|
321
322
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
322
323
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
323
|
-
) -> List[
|
324
|
+
) -> List[ProductRead]:
|
324
325
|
"""Get Products
|
325
326
|
|
326
327
|
Get all software products from Crypticorn
|
@@ -361,7 +362,7 @@ class ProductsApi:
|
|
361
362
|
)
|
362
363
|
|
363
364
|
_response_types_map: Dict[str, Optional[str]] = {
|
364
|
-
"200": "List[
|
365
|
+
"200": "List[ProductRead]",
|
365
366
|
"422": "HTTPValidationError",
|
366
367
|
}
|
367
368
|
response_data = await self.api_client.call_api(
|
@@ -399,7 +400,7 @@ class ProductsApi:
|
|
399
400
|
_content_type: Optional[StrictStr] = None,
|
400
401
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
401
402
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
402
|
-
) -> ApiResponse[List[
|
403
|
+
) -> ApiResponse[List[ProductRead]]:
|
403
404
|
"""Get Products
|
404
405
|
|
405
406
|
Get all software products from Crypticorn
|
@@ -440,7 +441,7 @@ class ProductsApi:
|
|
440
441
|
)
|
441
442
|
|
442
443
|
_response_types_map: Dict[str, Optional[str]] = {
|
443
|
-
"200": "List[
|
444
|
+
"200": "List[ProductRead]",
|
444
445
|
"422": "HTTPValidationError",
|
445
446
|
}
|
446
447
|
response_data = await self.api_client.call_api(
|
@@ -519,7 +520,7 @@ class ProductsApi:
|
|
519
520
|
)
|
520
521
|
|
521
522
|
_response_types_map: Dict[str, Optional[str]] = {
|
522
|
-
"200": "List[
|
523
|
+
"200": "List[ProductRead]",
|
523
524
|
"422": "HTTPValidationError",
|
524
525
|
}
|
525
526
|
response_data = await self.api_client.call_api(
|
@@ -592,7 +593,7 @@ class ProductsApi:
|
|
592
593
|
async def update_product(
|
593
594
|
self,
|
594
595
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
595
|
-
|
596
|
+
product_update: ProductUpdate,
|
596
597
|
_request_timeout: Union[
|
597
598
|
None,
|
598
599
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -604,15 +605,15 @@ class ProductsApi:
|
|
604
605
|
_content_type: Optional[StrictStr] = None,
|
605
606
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
606
607
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
607
|
-
) ->
|
608
|
+
) -> ProductRead:
|
608
609
|
"""Update Product
|
609
610
|
|
610
611
|
Update an existing product
|
611
612
|
|
612
613
|
:param id: The ID of the product to update (required)
|
613
614
|
:type id: str
|
614
|
-
:param
|
615
|
-
:type
|
615
|
+
:param product_update: (required)
|
616
|
+
:type product_update: ProductUpdate
|
616
617
|
:param _request_timeout: timeout setting for this request. If one
|
617
618
|
number provided, it will be total request
|
618
619
|
timeout. It can also be a pair (tuple) of
|
@@ -637,7 +638,7 @@ class ProductsApi:
|
|
637
638
|
|
638
639
|
_param = self._update_product_serialize(
|
639
640
|
id=id,
|
640
|
-
|
641
|
+
product_update=product_update,
|
641
642
|
_request_auth=_request_auth,
|
642
643
|
_content_type=_content_type,
|
643
644
|
_headers=_headers,
|
@@ -645,7 +646,7 @@ class ProductsApi:
|
|
645
646
|
)
|
646
647
|
|
647
648
|
_response_types_map: Dict[str, Optional[str]] = {
|
648
|
-
"200": "
|
649
|
+
"200": "ProductRead",
|
649
650
|
"422": "HTTPValidationError",
|
650
651
|
}
|
651
652
|
response_data = await self.api_client.call_api(
|
@@ -661,7 +662,7 @@ class ProductsApi:
|
|
661
662
|
async def update_product_with_http_info(
|
662
663
|
self,
|
663
664
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
664
|
-
|
665
|
+
product_update: ProductUpdate,
|
665
666
|
_request_timeout: Union[
|
666
667
|
None,
|
667
668
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -673,15 +674,15 @@ class ProductsApi:
|
|
673
674
|
_content_type: Optional[StrictStr] = None,
|
674
675
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
675
676
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
676
|
-
) -> ApiResponse[
|
677
|
+
) -> ApiResponse[ProductRead]:
|
677
678
|
"""Update Product
|
678
679
|
|
679
680
|
Update an existing product
|
680
681
|
|
681
682
|
:param id: The ID of the product to update (required)
|
682
683
|
:type id: str
|
683
|
-
:param
|
684
|
-
:type
|
684
|
+
:param product_update: (required)
|
685
|
+
:type product_update: ProductUpdate
|
685
686
|
:param _request_timeout: timeout setting for this request. If one
|
686
687
|
number provided, it will be total request
|
687
688
|
timeout. It can also be a pair (tuple) of
|
@@ -706,7 +707,7 @@ class ProductsApi:
|
|
706
707
|
|
707
708
|
_param = self._update_product_serialize(
|
708
709
|
id=id,
|
709
|
-
|
710
|
+
product_update=product_update,
|
710
711
|
_request_auth=_request_auth,
|
711
712
|
_content_type=_content_type,
|
712
713
|
_headers=_headers,
|
@@ -714,7 +715,7 @@ class ProductsApi:
|
|
714
715
|
)
|
715
716
|
|
716
717
|
_response_types_map: Dict[str, Optional[str]] = {
|
717
|
-
"200": "
|
718
|
+
"200": "ProductRead",
|
718
719
|
"422": "HTTPValidationError",
|
719
720
|
}
|
720
721
|
response_data = await self.api_client.call_api(
|
@@ -730,7 +731,7 @@ class ProductsApi:
|
|
730
731
|
async def update_product_without_preload_content(
|
731
732
|
self,
|
732
733
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
733
|
-
|
734
|
+
product_update: ProductUpdate,
|
734
735
|
_request_timeout: Union[
|
735
736
|
None,
|
736
737
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -749,8 +750,8 @@ class ProductsApi:
|
|
749
750
|
|
750
751
|
:param id: The ID of the product to update (required)
|
751
752
|
:type id: str
|
752
|
-
:param
|
753
|
-
:type
|
753
|
+
:param product_update: (required)
|
754
|
+
:type product_update: ProductUpdate
|
754
755
|
:param _request_timeout: timeout setting for this request. If one
|
755
756
|
number provided, it will be total request
|
756
757
|
timeout. It can also be a pair (tuple) of
|
@@ -775,7 +776,7 @@ class ProductsApi:
|
|
775
776
|
|
776
777
|
_param = self._update_product_serialize(
|
777
778
|
id=id,
|
778
|
-
|
779
|
+
product_update=product_update,
|
779
780
|
_request_auth=_request_auth,
|
780
781
|
_content_type=_content_type,
|
781
782
|
_headers=_headers,
|
@@ -783,7 +784,7 @@ class ProductsApi:
|
|
783
784
|
)
|
784
785
|
|
785
786
|
_response_types_map: Dict[str, Optional[str]] = {
|
786
|
-
"200": "
|
787
|
+
"200": "ProductRead",
|
787
788
|
"422": "HTTPValidationError",
|
788
789
|
}
|
789
790
|
response_data = await self.api_client.call_api(
|
@@ -794,7 +795,7 @@ class ProductsApi:
|
|
794
795
|
def _update_product_serialize(
|
795
796
|
self,
|
796
797
|
id,
|
797
|
-
|
798
|
+
product_update,
|
798
799
|
_request_auth,
|
799
800
|
_content_type,
|
800
801
|
_headers,
|
@@ -821,8 +822,8 @@ class ProductsApi:
|
|
821
822
|
# process the header parameters
|
822
823
|
# process the form parameters
|
823
824
|
# process the body parameter
|
824
|
-
if
|
825
|
-
_body_params =
|
825
|
+
if product_update is not None:
|
826
|
+
_body_params = product_update
|
826
827
|
|
827
828
|
# set the HTTP header `Accept`
|
828
829
|
if "Accept" not in _header_params:
|
@@ -21,13 +21,14 @@ 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.payment import Payment
|
24
25
|
from crypticorn.pay.client.models.payment_status import PaymentStatus
|
25
|
-
from crypticorn.pay.client.models.
|
26
|
-
from crypticorn.pay.client.models.
|
27
|
-
from crypticorn.pay.client.models.
|
26
|
+
from crypticorn.pay.client.models.product_create import ProductCreate
|
27
|
+
from crypticorn.pay.client.models.product_read import ProductRead
|
28
|
+
from crypticorn.pay.client.models.product_sub_read import ProductSubRead
|
29
|
+
from crypticorn.pay.client.models.product_update import ProductUpdate
|
28
30
|
from crypticorn.pay.client.models.scope import Scope
|
29
31
|
from crypticorn.pay.client.models.services import Services
|
30
|
-
from crypticorn.pay.client.models.unified_payment_model import UnifiedPaymentModel
|
31
32
|
from crypticorn.pay.client.models.validation_error import ValidationError
|
32
33
|
from crypticorn.pay.client.models.validation_error_loc_inner import (
|
33
34
|
ValidationErrorLocInner,
|