gr4vy 1.3.0__py3-none-any.whl → 1.4.1__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.
gr4vy/_version.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "gr4vy"
|
|
6
|
-
__version__: str = "1.
|
|
6
|
+
__version__: str = "1.4.1"
|
|
7
7
|
__openapi_doc_version__: str = "1.0.0"
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 1.
|
|
8
|
+
__gen_version__: str = "2.716.16"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 1.4.1 2.716.16 1.0.0 gr4vy"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
gr4vy/models/paymentlink.py
CHANGED
|
@@ -71,6 +71,8 @@ class PaymentLinkTypedDict(TypedDict):
|
|
|
71
71
|
r"""The buyer associated with the payment link."""
|
|
72
72
|
shipping_details: NotRequired[Nullable[ShippingDetailsTypedDict]]
|
|
73
73
|
r"""The shipping details for the payment link."""
|
|
74
|
+
connection_options: NotRequired[Nullable[Dict[str, Dict[str, Any]]]]
|
|
75
|
+
r"""The connection options for the payment link."""
|
|
74
76
|
|
|
75
77
|
|
|
76
78
|
class PaymentLink(BaseModel):
|
|
@@ -161,6 +163,9 @@ class PaymentLink(BaseModel):
|
|
|
161
163
|
shipping_details: OptionalNullable[ShippingDetails] = UNSET
|
|
162
164
|
r"""The shipping details for the payment link."""
|
|
163
165
|
|
|
166
|
+
connection_options: OptionalNullable[Dict[str, Dict[str, Any]]] = UNSET
|
|
167
|
+
r"""The connection options for the payment link."""
|
|
168
|
+
|
|
164
169
|
@model_serializer(mode="wrap")
|
|
165
170
|
def serialize_model(self, handler):
|
|
166
171
|
optional_fields = [
|
|
@@ -180,6 +185,7 @@ class PaymentLink(BaseModel):
|
|
|
180
185
|
"metadata",
|
|
181
186
|
"buyer",
|
|
182
187
|
"shipping_details",
|
|
188
|
+
"connection_options",
|
|
183
189
|
]
|
|
184
190
|
nullable_fields = [
|
|
185
191
|
"expires_at",
|
|
@@ -198,6 +204,7 @@ class PaymentLink(BaseModel):
|
|
|
198
204
|
"metadata",
|
|
199
205
|
"buyer",
|
|
200
206
|
"shipping_details",
|
|
207
|
+
"connection_options",
|
|
201
208
|
]
|
|
202
209
|
null_default_fields = []
|
|
203
210
|
|
gr4vy/utils/annotations.py
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from enum import Enum
|
|
4
4
|
from typing import Any, Optional
|
|
5
5
|
|
|
6
|
+
|
|
6
7
|
def get_discriminator(model: Any, fieldname: str, key: str) -> str:
|
|
7
8
|
"""
|
|
8
9
|
Recursively search for the discriminator attribute in a model.
|
|
@@ -25,31 +26,54 @@ def get_discriminator(model: Any, fieldname: str, key: str) -> str:
|
|
|
25
26
|
|
|
26
27
|
if isinstance(field, dict):
|
|
27
28
|
if key in field:
|
|
28
|
-
return f
|
|
29
|
+
return f"{field[key]}"
|
|
29
30
|
|
|
30
31
|
if hasattr(field, fieldname):
|
|
31
32
|
attr = getattr(field, fieldname)
|
|
32
33
|
if isinstance(attr, Enum):
|
|
33
|
-
return f
|
|
34
|
-
return f
|
|
34
|
+
return f"{attr.value}"
|
|
35
|
+
return f"{attr}"
|
|
35
36
|
|
|
36
37
|
if hasattr(field, upper_fieldname):
|
|
37
38
|
attr = getattr(field, upper_fieldname)
|
|
38
39
|
if isinstance(attr, Enum):
|
|
39
|
-
return f
|
|
40
|
-
return f
|
|
40
|
+
return f"{attr.value}"
|
|
41
|
+
return f"{attr}"
|
|
41
42
|
|
|
42
43
|
return None
|
|
43
44
|
|
|
45
|
+
def search_nested_discriminator(obj: Any) -> Optional[str]:
|
|
46
|
+
"""Recursively search for discriminator in nested structures."""
|
|
47
|
+
# First try direct field lookup
|
|
48
|
+
discriminator = get_field_discriminator(obj)
|
|
49
|
+
if discriminator is not None:
|
|
50
|
+
return discriminator
|
|
51
|
+
|
|
52
|
+
# If it's a dict, search in nested values
|
|
53
|
+
if isinstance(obj, dict):
|
|
54
|
+
for value in obj.values():
|
|
55
|
+
if isinstance(value, list):
|
|
56
|
+
# Search in list items
|
|
57
|
+
for item in value:
|
|
58
|
+
nested_discriminator = search_nested_discriminator(item)
|
|
59
|
+
if nested_discriminator is not None:
|
|
60
|
+
return nested_discriminator
|
|
61
|
+
elif isinstance(value, dict):
|
|
62
|
+
# Search in nested dict
|
|
63
|
+
nested_discriminator = search_nested_discriminator(value)
|
|
64
|
+
if nested_discriminator is not None:
|
|
65
|
+
return nested_discriminator
|
|
66
|
+
|
|
67
|
+
return None
|
|
44
68
|
|
|
45
69
|
if isinstance(model, list):
|
|
46
70
|
for field in model:
|
|
47
|
-
discriminator =
|
|
71
|
+
discriminator = search_nested_discriminator(field)
|
|
48
72
|
if discriminator is not None:
|
|
49
73
|
return discriminator
|
|
50
74
|
|
|
51
|
-
discriminator =
|
|
75
|
+
discriminator = search_nested_discriminator(model)
|
|
52
76
|
if discriminator is not None:
|
|
53
77
|
return discriminator
|
|
54
78
|
|
|
55
|
-
raise ValueError(f
|
|
79
|
+
raise ValueError(f"Could not find discriminator field {fieldname} in {model}")
|
|
@@ -2,7 +2,7 @@ gr4vy/__init__.py,sha256=w2u919V3Tzv4zEPQ-OYJ79gQ_4_SyW7GOFFoHtqXDFA,401
|
|
|
2
2
|
gr4vy/_hooks/__init__.py,sha256=p5J13DeYuISQyQWirjJAObHIf2VtIlOtFqnIpvjjVwk,118
|
|
3
3
|
gr4vy/_hooks/sdkhooks.py,sha256=3jKTs2B1lcAxBMJge9C-qL0RGbKGLcrHvikzi67Tbdo,2493
|
|
4
4
|
gr4vy/_hooks/types.py,sha256=0O7dbbolkiFAnHkNULvwoLsiXJu0_Wmhev163bvZbW8,3039
|
|
5
|
-
gr4vy/_version.py,sha256=
|
|
5
|
+
gr4vy/_version.py,sha256=zwGLAodOjzCigAUjs4BMF3DzU8T2HBfQhZFSTDIUevY,454
|
|
6
6
|
gr4vy/account_updater.py,sha256=mmTd25Oap80PBqQ3p4MvZ_buT5VS0zWc8s8cqfI7iyA,607
|
|
7
7
|
gr4vy/all.py,sha256=WwnLoNn3RgXNpf4Xoz12ct94JD7NMpLz-kzesHHh4m8,15172
|
|
8
8
|
gr4vy/audit_logs.py,sha256=duh_c9mO8vIcpCnB-c77EYn1tkuCp1cRT6a7l0VdZqc,17083
|
|
@@ -256,7 +256,7 @@ gr4vy/models/nuveiairlinedataoptions.py,sha256=LRvIzboyvbAK83iIxfkDDLfspgA2hB04i
|
|
|
256
256
|
gr4vy/models/nuveioptions.py,sha256=ms46xui6MunqvGv_SK9S1Q7VQo1UI0hju2kqjUFNeRE,2063
|
|
257
257
|
gr4vy/models/nuveipseoptions.py,sha256=0CtBMe2cxU6XToQamYy25jCD0rMAl2Ko2KETtNyta1Q,2426
|
|
258
258
|
gr4vy/models/oxxooptions.py,sha256=UjdEwwdwr-N7b8_3gwE1rgxjmfadQRghk9vzZmS4uPU,1910
|
|
259
|
-
gr4vy/models/paymentlink.py,sha256=
|
|
259
|
+
gr4vy/models/paymentlink.py,sha256=CH3JroLJo8G2i7C2Ei4E1xbToQ7I9v_SWyVcd7VrSRM,8380
|
|
260
260
|
gr4vy/models/paymentlinkcreate.py,sha256=8YYF6nr5sQauft4gy-Hcfcq-ADNpTzOjnS9zPs8Bww8,7427
|
|
261
261
|
gr4vy/models/paymentlinks.py,sha256=i7Sj7x18rY5HR-E_LkinvTpVjnl8aCMCldQJFXnV9Lk,2175
|
|
262
262
|
gr4vy/models/paymentlinkstatus.py,sha256=e09HkfXNZDZSN_lkHCyiW7IaI-8JtM-_UmSOQ_im7ZE,334
|
|
@@ -412,7 +412,7 @@ gr4vy/transactions_settlements.py,sha256=YOH0JAGvli36XhKKXyQ81JIIuv59uCOpqBri6Sl
|
|
|
412
412
|
gr4vy/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
|
|
413
413
|
gr4vy/types/basemodel.py,sha256=L79WXvTECbSqaJzs8D3ud_KdIWkU7Cx2wbohDAktE9E,1127
|
|
414
414
|
gr4vy/utils/__init__.py,sha256=CAG0O76aEToGKXpT6Ft87Vd-iiQTh4XdBrQ37BVbsiM,5861
|
|
415
|
-
gr4vy/utils/annotations.py,sha256=
|
|
415
|
+
gr4vy/utils/annotations.py,sha256=FvfvVTUj8TUclm4HbGgY5yi2Ap7EzGmu2UPFU4FwC1w,2755
|
|
416
416
|
gr4vy/utils/datetimes.py,sha256=oppAA5e3V35pQov1-FNLKxAaNF1_XWi-bQtyjjql3H8,855
|
|
417
417
|
gr4vy/utils/enums.py,sha256=REU6ydF8gsVL3xaeGX4sMNyiL3q5P9h29-f6Sa6luAE,2633
|
|
418
418
|
gr4vy/utils/eventstreaming.py,sha256=SgFqMcUOYKlrTQ4gAp_dNcKLvDXukeiEMNU3DP8mXk8,6692
|
|
@@ -429,6 +429,6 @@ gr4vy/utils/unmarshal_json_response.py,sha256=H7jxugtMDuagdBXdpGiPf0Vr5-PWLETp8B
|
|
|
429
429
|
gr4vy/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
|
|
430
430
|
gr4vy/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
|
|
431
431
|
gr4vy/webhooks.py,sha256=2L-ZhdK-XU2X0AkVqgZvhfRqDCKUVs7R4UNCmZJR78w,1359
|
|
432
|
-
gr4vy-1.
|
|
433
|
-
gr4vy-1.
|
|
434
|
-
gr4vy-1.
|
|
432
|
+
gr4vy-1.4.1.dist-info/METADATA,sha256=GzEbEmbohQmj2q-_0CNZtEExMqrNmPILGWJ46gIk6Xo,44202
|
|
433
|
+
gr4vy-1.4.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
434
|
+
gr4vy-1.4.1.dist-info/RECORD,,
|
|
File without changes
|