gr4vy 1.10.17__py3-none-any.whl → 1.10.19__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 +3 -3
- gr4vy/all.py +6 -0
- gr4vy/models/create_full_transaction_refundop.py +13 -2
- gr4vy/models/create_transaction_refundop.py +21 -3
- gr4vy/transactions_refunds.py +6 -0
- {gr4vy-1.10.17.dist-info → gr4vy-1.10.19.dist-info}/METADATA +1 -1
- {gr4vy-1.10.17.dist-info → gr4vy-1.10.19.dist-info}/RECORD +8 -8
- {gr4vy-1.10.17.dist-info → gr4vy-1.10.19.dist-info}/WHEEL +0 -0
gr4vy/_version.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "gr4vy"
|
|
6
|
-
__version__: str = "1.10.
|
|
6
|
+
__version__: str = "1.10.19"
|
|
7
7
|
__openapi_doc_version__: str = "1.0.0"
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 1.10.
|
|
8
|
+
__gen_version__: str = "2.801.2"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 1.10.19 2.801.2 1.0.0 gr4vy"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
gr4vy/all.py
CHANGED
|
@@ -15,6 +15,7 @@ class All(BaseSDK):
|
|
|
15
15
|
*,
|
|
16
16
|
transaction_id: str,
|
|
17
17
|
merchant_account_id: Optional[str] = None,
|
|
18
|
+
idempotency_key: OptionalNullable[str] = UNSET,
|
|
18
19
|
reason: OptionalNullable[str] = UNSET,
|
|
19
20
|
external_identifier: OptionalNullable[str] = UNSET,
|
|
20
21
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -28,6 +29,7 @@ class All(BaseSDK):
|
|
|
28
29
|
|
|
29
30
|
:param transaction_id: The ID of the transaction
|
|
30
31
|
:param merchant_account_id: The ID of the merchant account to use for this request.
|
|
32
|
+
:param idempotency_key: A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions.
|
|
31
33
|
:param reason: An optional reason to attach extra context to the refund requests.
|
|
32
34
|
:param external_identifier: An external identifier that can be used to match the refunds against your own records.
|
|
33
35
|
:param retries: Override the default retry configuration for this method
|
|
@@ -48,6 +50,7 @@ class All(BaseSDK):
|
|
|
48
50
|
request = models.CreateFullTransactionRefundRequest(
|
|
49
51
|
transaction_id=transaction_id,
|
|
50
52
|
merchant_account_id=merchant_account_id,
|
|
53
|
+
idempotency_key=idempotency_key,
|
|
51
54
|
transaction_refund_all_create=models.TransactionRefundAllCreate(
|
|
52
55
|
reason=reason,
|
|
53
56
|
external_identifier=external_identifier,
|
|
@@ -174,6 +177,7 @@ class All(BaseSDK):
|
|
|
174
177
|
*,
|
|
175
178
|
transaction_id: str,
|
|
176
179
|
merchant_account_id: Optional[str] = None,
|
|
180
|
+
idempotency_key: OptionalNullable[str] = UNSET,
|
|
177
181
|
reason: OptionalNullable[str] = UNSET,
|
|
178
182
|
external_identifier: OptionalNullable[str] = UNSET,
|
|
179
183
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -187,6 +191,7 @@ class All(BaseSDK):
|
|
|
187
191
|
|
|
188
192
|
:param transaction_id: The ID of the transaction
|
|
189
193
|
:param merchant_account_id: The ID of the merchant account to use for this request.
|
|
194
|
+
:param idempotency_key: A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions.
|
|
190
195
|
:param reason: An optional reason to attach extra context to the refund requests.
|
|
191
196
|
:param external_identifier: An external identifier that can be used to match the refunds against your own records.
|
|
192
197
|
:param retries: Override the default retry configuration for this method
|
|
@@ -207,6 +212,7 @@ class All(BaseSDK):
|
|
|
207
212
|
request = models.CreateFullTransactionRefundRequest(
|
|
208
213
|
transaction_id=transaction_id,
|
|
209
214
|
merchant_account_id=merchant_account_id,
|
|
215
|
+
idempotency_key=idempotency_key,
|
|
210
216
|
transaction_refund_all_create=models.TransactionRefundAllCreate(
|
|
211
217
|
reason=reason,
|
|
212
218
|
external_identifier=external_identifier,
|
|
@@ -53,6 +53,8 @@ class CreateFullTransactionRefundRequestTypedDict(TypedDict):
|
|
|
53
53
|
r"""The ID of the transaction"""
|
|
54
54
|
merchant_account_id: NotRequired[str]
|
|
55
55
|
r"""The ID of the merchant account to use for this request."""
|
|
56
|
+
idempotency_key: NotRequired[Nullable[str]]
|
|
57
|
+
r"""A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions."""
|
|
56
58
|
transaction_refund_all_create: NotRequired[
|
|
57
59
|
Nullable[TransactionRefundAllCreateTypedDict]
|
|
58
60
|
]
|
|
@@ -71,6 +73,13 @@ class CreateFullTransactionRefundRequest(BaseModel):
|
|
|
71
73
|
] = None
|
|
72
74
|
r"""The ID of the merchant account to use for this request."""
|
|
73
75
|
|
|
76
|
+
idempotency_key: Annotated[
|
|
77
|
+
OptionalNullable[str],
|
|
78
|
+
pydantic.Field(alias="idempotency-key"),
|
|
79
|
+
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
|
80
|
+
] = UNSET
|
|
81
|
+
r"""A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions."""
|
|
82
|
+
|
|
74
83
|
transaction_refund_all_create: Annotated[
|
|
75
84
|
OptionalNullable[TransactionRefundAllCreate],
|
|
76
85
|
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
|
@@ -78,8 +87,10 @@ class CreateFullTransactionRefundRequest(BaseModel):
|
|
|
78
87
|
|
|
79
88
|
@model_serializer(mode="wrap")
|
|
80
89
|
def serialize_model(self, handler):
|
|
81
|
-
optional_fields = set(
|
|
82
|
-
|
|
90
|
+
optional_fields = set(
|
|
91
|
+
["merchant_account_id", "idempotency-key", "TransactionRefundAllCreate"]
|
|
92
|
+
)
|
|
93
|
+
nullable_fields = set(["idempotency-key", "TransactionRefundAllCreate"])
|
|
83
94
|
serialized = handler(self)
|
|
84
95
|
m = {}
|
|
85
96
|
|
|
@@ -5,7 +5,7 @@ from .transactionrefundcreate import (
|
|
|
5
5
|
TransactionRefundCreate,
|
|
6
6
|
TransactionRefundCreateTypedDict,
|
|
7
7
|
)
|
|
8
|
-
from gr4vy.types import BaseModel, UNSET_SENTINEL
|
|
8
|
+
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
9
9
|
from gr4vy.utils import (
|
|
10
10
|
FieldMetadata,
|
|
11
11
|
HeaderMetadata,
|
|
@@ -54,6 +54,8 @@ class CreateTransactionRefundRequestTypedDict(TypedDict):
|
|
|
54
54
|
transaction_refund_create: TransactionRefundCreateTypedDict
|
|
55
55
|
merchant_account_id: NotRequired[str]
|
|
56
56
|
r"""The ID of the merchant account to use for this request."""
|
|
57
|
+
idempotency_key: NotRequired[Nullable[str]]
|
|
58
|
+
r"""A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions."""
|
|
57
59
|
|
|
58
60
|
|
|
59
61
|
class CreateTransactionRefundRequest(BaseModel):
|
|
@@ -74,18 +76,34 @@ class CreateTransactionRefundRequest(BaseModel):
|
|
|
74
76
|
] = None
|
|
75
77
|
r"""The ID of the merchant account to use for this request."""
|
|
76
78
|
|
|
79
|
+
idempotency_key: Annotated[
|
|
80
|
+
OptionalNullable[str],
|
|
81
|
+
pydantic.Field(alias="idempotency-key"),
|
|
82
|
+
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
|
83
|
+
] = UNSET
|
|
84
|
+
r"""A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions."""
|
|
85
|
+
|
|
77
86
|
@model_serializer(mode="wrap")
|
|
78
87
|
def serialize_model(self, handler):
|
|
79
|
-
optional_fields = set(["merchant_account_id"])
|
|
88
|
+
optional_fields = set(["merchant_account_id", "idempotency-key"])
|
|
89
|
+
nullable_fields = set(["idempotency-key"])
|
|
80
90
|
serialized = handler(self)
|
|
81
91
|
m = {}
|
|
82
92
|
|
|
83
93
|
for n, f in type(self).model_fields.items():
|
|
84
94
|
k = f.alias or n
|
|
85
95
|
val = serialized.get(k)
|
|
96
|
+
is_nullable_and_explicitly_set = (
|
|
97
|
+
k in nullable_fields
|
|
98
|
+
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
99
|
+
)
|
|
86
100
|
|
|
87
101
|
if val != UNSET_SENTINEL:
|
|
88
|
-
if
|
|
102
|
+
if (
|
|
103
|
+
val is not None
|
|
104
|
+
or k not in optional_fields
|
|
105
|
+
or is_nullable_and_explicitly_set
|
|
106
|
+
):
|
|
89
107
|
m[k] = val
|
|
90
108
|
|
|
91
109
|
return m
|
gr4vy/transactions_refunds.py
CHANGED
|
@@ -325,6 +325,7 @@ class TransactionsRefunds(BaseSDK):
|
|
|
325
325
|
*,
|
|
326
326
|
transaction_id: str,
|
|
327
327
|
merchant_account_id: Optional[str] = None,
|
|
328
|
+
idempotency_key: OptionalNullable[str] = UNSET,
|
|
328
329
|
amount: OptionalNullable[int] = UNSET,
|
|
329
330
|
target_type: Optional[models.RefundTargetType] = None,
|
|
330
331
|
target_id: OptionalNullable[str] = UNSET,
|
|
@@ -341,6 +342,7 @@ class TransactionsRefunds(BaseSDK):
|
|
|
341
342
|
|
|
342
343
|
:param transaction_id: The ID of the transaction
|
|
343
344
|
:param merchant_account_id: The ID of the merchant account to use for this request.
|
|
345
|
+
:param idempotency_key: A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions.
|
|
344
346
|
:param amount: The amount to refund, in the smallest currency unit (e.g., cents). If omitted, a full refund will be requested.
|
|
345
347
|
:param target_type:
|
|
346
348
|
:param target_id: The optional ID of the instrument to refund for. This is only required when the `target_type` is set to `gift-card-redemption`.
|
|
@@ -364,6 +366,7 @@ class TransactionsRefunds(BaseSDK):
|
|
|
364
366
|
request = models.CreateTransactionRefundRequest(
|
|
365
367
|
transaction_id=transaction_id,
|
|
366
368
|
merchant_account_id=merchant_account_id,
|
|
369
|
+
idempotency_key=idempotency_key,
|
|
367
370
|
transaction_refund_create=models.TransactionRefundCreate(
|
|
368
371
|
amount=amount,
|
|
369
372
|
target_type=target_type,
|
|
@@ -493,6 +496,7 @@ class TransactionsRefunds(BaseSDK):
|
|
|
493
496
|
*,
|
|
494
497
|
transaction_id: str,
|
|
495
498
|
merchant_account_id: Optional[str] = None,
|
|
499
|
+
idempotency_key: OptionalNullable[str] = UNSET,
|
|
496
500
|
amount: OptionalNullable[int] = UNSET,
|
|
497
501
|
target_type: Optional[models.RefundTargetType] = None,
|
|
498
502
|
target_id: OptionalNullable[str] = UNSET,
|
|
@@ -509,6 +513,7 @@ class TransactionsRefunds(BaseSDK):
|
|
|
509
513
|
|
|
510
514
|
:param transaction_id: The ID of the transaction
|
|
511
515
|
:param merchant_account_id: The ID of the merchant account to use for this request.
|
|
516
|
+
:param idempotency_key: A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions.
|
|
512
517
|
:param amount: The amount to refund, in the smallest currency unit (e.g., cents). If omitted, a full refund will be requested.
|
|
513
518
|
:param target_type:
|
|
514
519
|
:param target_id: The optional ID of the instrument to refund for. This is only required when the `target_type` is set to `gift-card-redemption`.
|
|
@@ -532,6 +537,7 @@ class TransactionsRefunds(BaseSDK):
|
|
|
532
537
|
request = models.CreateTransactionRefundRequest(
|
|
533
538
|
transaction_id=transaction_id,
|
|
534
539
|
merchant_account_id=merchant_account_id,
|
|
540
|
+
idempotency_key=idempotency_key,
|
|
535
541
|
transaction_refund_create=models.TransactionRefundCreate(
|
|
536
542
|
amount=amount,
|
|
537
543
|
target_type=target_type,
|
|
@@ -2,10 +2,10 @@ 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=64fvW1Wezpen5wHMr90NZkcb33Dg4s4uHQs-XgsiGdc,456
|
|
6
6
|
gr4vy/account_updater.py,sha256=mmTd25Oap80PBqQ3p4MvZ_buT5VS0zWc8s8cqfI7iyA,607
|
|
7
7
|
gr4vy/actions.py,sha256=M0SgxWTiduh6x8zvOzO7wghlPz58jSJDJ1EjlvgjNXc,14008
|
|
8
|
-
gr4vy/all.py,sha256=
|
|
8
|
+
gr4vy/all.py,sha256=D1JZzBF24nXZqVtjDTMCRvMbq-S7JSQK0TYw6yiJc00,15910
|
|
9
9
|
gr4vy/audit_logs.py,sha256=xbdj2X5OfgDu8SE5yk8aRlJcNlU-k7AZRFTQMGJGGVM,17159
|
|
10
10
|
gr4vy/auth.py,sha256=gxS5MjLUA0r1mSZADniCIQV4khqAn7FMvrTh-9Czm1g,8714
|
|
11
11
|
gr4vy/balances.py,sha256=OlFgk2Zj7r8hOMkVsY01hO_AutfpbIOYUHylSQhRKF4,14472
|
|
@@ -108,7 +108,7 @@ gr4vy/models/configure_digital_walletop.py,sha256=99-HWU0tTWSORRj7Wv8RZXVE6HNDU8
|
|
|
108
108
|
gr4vy/models/create_account_updater_jobop.py,sha256=f-LsXDXbmAGmbwU_cuGj4FIqsPf_N8FYZCDxZcRGU1U,2608
|
|
109
109
|
gr4vy/models/create_apple_pay_digital_wallet_sessionop.py,sha256=s6nUOuFgcPWqwaFl7_G4hVM_tQCcAFJor4uTVyCuVZQ,2645
|
|
110
110
|
gr4vy/models/create_checkout_sessionop.py,sha256=2_Im7XYVKKGsiH1LBc2MJpUv1ZmYBGmDuy_N5-ne39s,2626
|
|
111
|
-
gr4vy/models/create_full_transaction_refundop.py,sha256=
|
|
111
|
+
gr4vy/models/create_full_transaction_refundop.py,sha256=ZpvyRyNX8Es6tH25p4GBntapNwPLAa4kuuvCaTTzt0k,4133
|
|
112
112
|
gr4vy/models/create_gift_cardop.py,sha256=b3TrBsc4TURRfG8tlEPfpvIEGHuZBWCe_kJKu6Jnxo8,2494
|
|
113
113
|
gr4vy/models/create_google_pay_digital_wallet_sessionop.py,sha256=DMq6vZh-w4QKKe8R9gJuXTxC5yZuR6AnsMb_ISY3UB4,2656
|
|
114
114
|
gr4vy/models/create_payment_method_network_token_cryptogramop.py,sha256=LUaK8j5JteWJCBLaGaOPamCXIyFbAqXX3Hd3zA_OZBE,3110
|
|
@@ -121,7 +121,7 @@ gr4vy/models/create_payment_serviceop.py,sha256=Eo3lO6Ill-_lI9X2uxTOwB6n88G99t3R
|
|
|
121
121
|
gr4vy/models/create_payoutop.py,sha256=pB5jABm11pB7xp9LUbTJbNioTVfJUGRTT9NL2D9-Y7g,2470
|
|
122
122
|
gr4vy/models/create_report_execution_urlop.py,sha256=WuXjUREAw6CTuS1OkCshvkRa4wBuXxBVqtXZfUniGdo,3271
|
|
123
123
|
gr4vy/models/create_three_ds_scenarioop.py,sha256=CiBksCgTg79ypQ1pSzk0OgF1Q5NsZ-CrnsOpf4oc3O8,2623
|
|
124
|
-
gr4vy/models/create_transaction_refundop.py,sha256=
|
|
124
|
+
gr4vy/models/create_transaction_refundop.py,sha256=33iB4DhMo9jK93zJvtuduBGZIBdljOYKenMjhTMxPvI,3949
|
|
125
125
|
gr4vy/models/create_transactionop.py,sha256=ZQnhJwdB4qhEtPCKvzyWJxWG5fe-DsAnXImQUx5Pe4Q,4314
|
|
126
126
|
gr4vy/models/createsession.py,sha256=k680YHp6sJ3AwBsFN_SACZXYOnmxd1gnP8YDDRK93X8,2773
|
|
127
127
|
gr4vy/models/createsessionstatus.py,sha256=8RrlFPRhsWBPCUjVhOpz-x-DIzEq7LVjavaK3_XIAJM,295
|
|
@@ -438,7 +438,7 @@ gr4vy/sdkconfiguration.py,sha256=aBQ8gY9aOjf1TL0kSLat8hEIoH4lCE9_PhihyhBpRE4,198
|
|
|
438
438
|
gr4vy/sessions.py,sha256=AA32Wu6OmJbJ7GdypptwmK31SbZH4VLLuo3gnzD4nJE,41837
|
|
439
439
|
gr4vy/three_ds_scenarios.py,sha256=FJsCE7T8jyPspn7VXCDfJPXzfTYGkXgbrVTT-zNzK0Y,59670
|
|
440
440
|
gr4vy/transactions.py,sha256=BllzoYY8qTVSZ0T-WlEN6R-i5ocDFSUJlajVhhE4MB0,170925
|
|
441
|
-
gr4vy/transactions_refunds.py,sha256=
|
|
441
|
+
gr4vy/transactions_refunds.py,sha256=NGbQsGD8TGc-HT8INOCapLZumJs3OF32qBsH8fyPhT8,44481
|
|
442
442
|
gr4vy/transactions_settlements.py,sha256=oxVGRIMmcwKhZWN0KWW1Wm3831m5y55SU17LMRaKmEM,27902
|
|
443
443
|
gr4vy/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
|
|
444
444
|
gr4vy/types/basemodel.py,sha256=MULDVywSVxR0lo8h5wMnXnkBFXLK5DXmBKD1eXAVKgE,2879
|
|
@@ -460,6 +460,6 @@ gr4vy/utils/unmarshal_json_response.py,sha256=G4h8gLOK09kjhPiUZjgIMm6zntcbxpvb_m
|
|
|
460
460
|
gr4vy/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
|
|
461
461
|
gr4vy/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
|
|
462
462
|
gr4vy/webhooks.py,sha256=2L-ZhdK-XU2X0AkVqgZvhfRqDCKUVs7R4UNCmZJR78w,1359
|
|
463
|
-
gr4vy-1.10.
|
|
464
|
-
gr4vy-1.10.
|
|
465
|
-
gr4vy-1.10.
|
|
463
|
+
gr4vy-1.10.19.dist-info/METADATA,sha256=NNawii6MER5b7WKWW_Rxbh81ywi5V0AFQjf9sY-WHmc,44924
|
|
464
|
+
gr4vy-1.10.19.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
465
|
+
gr4vy-1.10.19.dist-info/RECORD,,
|
|
File without changes
|