gr4vy 1.10.6__py3-none-any.whl → 1.10.7__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.

Potentially problematic release.


This version of gr4vy might be problematic. Click here for more details.

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"
6
+ __version__: str = "1.10.7"
7
7
  __openapi_doc_version__: str = "1.0.0"
8
8
  __gen_version__: str = "2.791.1"
9
- __user_agent__: str = "speakeasy-sdk/python 1.10.6 2.791.1 1.0.0 gr4vy"
9
+ __user_agent__: str = "speakeasy-sdk/python 1.10.7 2.791.1 1.0.0 gr4vy"
10
10
 
11
11
  try:
12
12
  if __package__ is not None:
gr4vy/actions.py ADDED
@@ -0,0 +1,307 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from .basesdk import BaseSDK
4
+ from gr4vy import errors, models, utils
5
+ from gr4vy._hooks import HookContext
6
+ from gr4vy.types import OptionalNullable, UNSET
7
+ from gr4vy.utils import get_security_from_env
8
+ from gr4vy.utils.unmarshal_json_response import unmarshal_json_response
9
+ from typing import Any, Mapping, Optional
10
+
11
+
12
+ class Actions(BaseSDK):
13
+ def list(
14
+ self,
15
+ *,
16
+ transaction_id: str,
17
+ merchant_account_id: Optional[str] = None,
18
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
19
+ server_url: Optional[str] = None,
20
+ timeout_ms: Optional[int] = None,
21
+ http_headers: Optional[Mapping[str, str]] = None,
22
+ ) -> models.TransactionActions:
23
+ r"""Get Flow actions for transaction
24
+
25
+ Retrieve the list of Flow actions that have been triggered for a transaction.
26
+
27
+ :param transaction_id: The ID of the transaction
28
+ :param merchant_account_id: The ID of the merchant account to use for this request.
29
+ :param retries: Override the default retry configuration for this method
30
+ :param server_url: Override the default server URL for this method
31
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
32
+ :param http_headers: Additional headers to set or replace on requests.
33
+ """
34
+ base_url = None
35
+ url_variables = None
36
+ if timeout_ms is None:
37
+ timeout_ms = self.sdk_configuration.timeout_ms
38
+
39
+ if server_url is not None:
40
+ base_url = server_url
41
+ else:
42
+ base_url = self._get_url(base_url, url_variables)
43
+
44
+ request = models.ListTransactionActionsRequest(
45
+ transaction_id=transaction_id,
46
+ merchant_account_id=merchant_account_id,
47
+ )
48
+
49
+ req = self._build_request(
50
+ method="GET",
51
+ path="/transactions/{transaction_id}/actions",
52
+ base_url=base_url,
53
+ url_variables=url_variables,
54
+ request=request,
55
+ request_body_required=False,
56
+ request_has_path_params=True,
57
+ request_has_query_params=True,
58
+ user_agent_header="user-agent",
59
+ accept_header_value="application/json",
60
+ http_headers=http_headers,
61
+ _globals=models.ListTransactionActionsGlobals(
62
+ merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
63
+ ),
64
+ security=self.sdk_configuration.security,
65
+ allow_empty_value=None,
66
+ timeout_ms=timeout_ms,
67
+ )
68
+
69
+ if retries == UNSET:
70
+ if self.sdk_configuration.retry_config is not UNSET:
71
+ retries = self.sdk_configuration.retry_config
72
+ else:
73
+ retries = utils.RetryConfig(
74
+ "backoff", utils.BackoffStrategy(200, 200, 1, 1000), True
75
+ )
76
+
77
+ retry_config = None
78
+ if isinstance(retries, utils.RetryConfig):
79
+ retry_config = (retries, ["5XX"])
80
+
81
+ http_res = self.do_request(
82
+ hook_ctx=HookContext(
83
+ config=self.sdk_configuration,
84
+ base_url=base_url or "",
85
+ operation_id="list_transaction_actions",
86
+ oauth2_scopes=None,
87
+ security_source=get_security_from_env(
88
+ self.sdk_configuration.security, models.Security
89
+ ),
90
+ ),
91
+ request=req,
92
+ error_status_codes=[
93
+ "400",
94
+ "401",
95
+ "403",
96
+ "404",
97
+ "405",
98
+ "409",
99
+ "422",
100
+ "425",
101
+ "429",
102
+ "4XX",
103
+ "500",
104
+ "502",
105
+ "504",
106
+ "5XX",
107
+ ],
108
+ retry_config=retry_config,
109
+ )
110
+
111
+ response_data: Any = None
112
+ if utils.match_response(http_res, "200", "application/json"):
113
+ return unmarshal_json_response(models.TransactionActions, http_res)
114
+ if utils.match_response(http_res, "400", "application/json"):
115
+ response_data = unmarshal_json_response(errors.Error400Data, http_res)
116
+ raise errors.Error400(response_data, http_res)
117
+ if utils.match_response(http_res, "401", "application/json"):
118
+ response_data = unmarshal_json_response(errors.Error401Data, http_res)
119
+ raise errors.Error401(response_data, http_res)
120
+ if utils.match_response(http_res, "403", "application/json"):
121
+ response_data = unmarshal_json_response(errors.Error403Data, http_res)
122
+ raise errors.Error403(response_data, http_res)
123
+ if utils.match_response(http_res, "404", "application/json"):
124
+ response_data = unmarshal_json_response(errors.Error404Data, http_res)
125
+ raise errors.Error404(response_data, http_res)
126
+ if utils.match_response(http_res, "405", "application/json"):
127
+ response_data = unmarshal_json_response(errors.Error405Data, http_res)
128
+ raise errors.Error405(response_data, http_res)
129
+ if utils.match_response(http_res, "409", "application/json"):
130
+ response_data = unmarshal_json_response(errors.Error409Data, http_res)
131
+ raise errors.Error409(response_data, http_res)
132
+ if utils.match_response(http_res, "422", "application/json"):
133
+ response_data = unmarshal_json_response(
134
+ errors.HTTPValidationErrorData, http_res
135
+ )
136
+ raise errors.HTTPValidationError(response_data, http_res)
137
+ if utils.match_response(http_res, "425", "application/json"):
138
+ response_data = unmarshal_json_response(errors.Error425Data, http_res)
139
+ raise errors.Error425(response_data, http_res)
140
+ if utils.match_response(http_res, "429", "application/json"):
141
+ response_data = unmarshal_json_response(errors.Error429Data, http_res)
142
+ raise errors.Error429(response_data, http_res)
143
+ if utils.match_response(http_res, "500", "application/json"):
144
+ response_data = unmarshal_json_response(errors.Error500Data, http_res)
145
+ raise errors.Error500(response_data, http_res)
146
+ if utils.match_response(http_res, "502", "application/json"):
147
+ response_data = unmarshal_json_response(errors.Error502Data, http_res)
148
+ raise errors.Error502(response_data, http_res)
149
+ if utils.match_response(http_res, "504", "application/json"):
150
+ response_data = unmarshal_json_response(errors.Error504Data, http_res)
151
+ raise errors.Error504(response_data, http_res)
152
+ if utils.match_response(http_res, "4XX", "*"):
153
+ http_res_text = utils.stream_to_text(http_res)
154
+ raise errors.APIError("API error occurred", http_res, http_res_text)
155
+ if utils.match_response(http_res, "5XX", "*"):
156
+ http_res_text = utils.stream_to_text(http_res)
157
+ raise errors.APIError("API error occurred", http_res, http_res_text)
158
+
159
+ raise errors.APIError("Unexpected response received", http_res)
160
+
161
+ async def list_async(
162
+ self,
163
+ *,
164
+ transaction_id: str,
165
+ merchant_account_id: Optional[str] = None,
166
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
167
+ server_url: Optional[str] = None,
168
+ timeout_ms: Optional[int] = None,
169
+ http_headers: Optional[Mapping[str, str]] = None,
170
+ ) -> models.TransactionActions:
171
+ r"""Get Flow actions for transaction
172
+
173
+ Retrieve the list of Flow actions that have been triggered for a transaction.
174
+
175
+ :param transaction_id: The ID of the transaction
176
+ :param merchant_account_id: The ID of the merchant account to use for this request.
177
+ :param retries: Override the default retry configuration for this method
178
+ :param server_url: Override the default server URL for this method
179
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
180
+ :param http_headers: Additional headers to set or replace on requests.
181
+ """
182
+ base_url = None
183
+ url_variables = None
184
+ if timeout_ms is None:
185
+ timeout_ms = self.sdk_configuration.timeout_ms
186
+
187
+ if server_url is not None:
188
+ base_url = server_url
189
+ else:
190
+ base_url = self._get_url(base_url, url_variables)
191
+
192
+ request = models.ListTransactionActionsRequest(
193
+ transaction_id=transaction_id,
194
+ merchant_account_id=merchant_account_id,
195
+ )
196
+
197
+ req = self._build_request_async(
198
+ method="GET",
199
+ path="/transactions/{transaction_id}/actions",
200
+ base_url=base_url,
201
+ url_variables=url_variables,
202
+ request=request,
203
+ request_body_required=False,
204
+ request_has_path_params=True,
205
+ request_has_query_params=True,
206
+ user_agent_header="user-agent",
207
+ accept_header_value="application/json",
208
+ http_headers=http_headers,
209
+ _globals=models.ListTransactionActionsGlobals(
210
+ merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
211
+ ),
212
+ security=self.sdk_configuration.security,
213
+ allow_empty_value=None,
214
+ timeout_ms=timeout_ms,
215
+ )
216
+
217
+ if retries == UNSET:
218
+ if self.sdk_configuration.retry_config is not UNSET:
219
+ retries = self.sdk_configuration.retry_config
220
+ else:
221
+ retries = utils.RetryConfig(
222
+ "backoff", utils.BackoffStrategy(200, 200, 1, 1000), True
223
+ )
224
+
225
+ retry_config = None
226
+ if isinstance(retries, utils.RetryConfig):
227
+ retry_config = (retries, ["5XX"])
228
+
229
+ http_res = await self.do_request_async(
230
+ hook_ctx=HookContext(
231
+ config=self.sdk_configuration,
232
+ base_url=base_url or "",
233
+ operation_id="list_transaction_actions",
234
+ oauth2_scopes=None,
235
+ security_source=get_security_from_env(
236
+ self.sdk_configuration.security, models.Security
237
+ ),
238
+ ),
239
+ request=req,
240
+ error_status_codes=[
241
+ "400",
242
+ "401",
243
+ "403",
244
+ "404",
245
+ "405",
246
+ "409",
247
+ "422",
248
+ "425",
249
+ "429",
250
+ "4XX",
251
+ "500",
252
+ "502",
253
+ "504",
254
+ "5XX",
255
+ ],
256
+ retry_config=retry_config,
257
+ )
258
+
259
+ response_data: Any = None
260
+ if utils.match_response(http_res, "200", "application/json"):
261
+ return unmarshal_json_response(models.TransactionActions, http_res)
262
+ if utils.match_response(http_res, "400", "application/json"):
263
+ response_data = unmarshal_json_response(errors.Error400Data, http_res)
264
+ raise errors.Error400(response_data, http_res)
265
+ if utils.match_response(http_res, "401", "application/json"):
266
+ response_data = unmarshal_json_response(errors.Error401Data, http_res)
267
+ raise errors.Error401(response_data, http_res)
268
+ if utils.match_response(http_res, "403", "application/json"):
269
+ response_data = unmarshal_json_response(errors.Error403Data, http_res)
270
+ raise errors.Error403(response_data, http_res)
271
+ if utils.match_response(http_res, "404", "application/json"):
272
+ response_data = unmarshal_json_response(errors.Error404Data, http_res)
273
+ raise errors.Error404(response_data, http_res)
274
+ if utils.match_response(http_res, "405", "application/json"):
275
+ response_data = unmarshal_json_response(errors.Error405Data, http_res)
276
+ raise errors.Error405(response_data, http_res)
277
+ if utils.match_response(http_res, "409", "application/json"):
278
+ response_data = unmarshal_json_response(errors.Error409Data, http_res)
279
+ raise errors.Error409(response_data, http_res)
280
+ if utils.match_response(http_res, "422", "application/json"):
281
+ response_data = unmarshal_json_response(
282
+ errors.HTTPValidationErrorData, http_res
283
+ )
284
+ raise errors.HTTPValidationError(response_data, http_res)
285
+ if utils.match_response(http_res, "425", "application/json"):
286
+ response_data = unmarshal_json_response(errors.Error425Data, http_res)
287
+ raise errors.Error425(response_data, http_res)
288
+ if utils.match_response(http_res, "429", "application/json"):
289
+ response_data = unmarshal_json_response(errors.Error429Data, http_res)
290
+ raise errors.Error429(response_data, http_res)
291
+ if utils.match_response(http_res, "500", "application/json"):
292
+ response_data = unmarshal_json_response(errors.Error500Data, http_res)
293
+ raise errors.Error500(response_data, http_res)
294
+ if utils.match_response(http_res, "502", "application/json"):
295
+ response_data = unmarshal_json_response(errors.Error502Data, http_res)
296
+ raise errors.Error502(response_data, http_res)
297
+ if utils.match_response(http_res, "504", "application/json"):
298
+ response_data = unmarshal_json_response(errors.Error504Data, http_res)
299
+ raise errors.Error504(response_data, http_res)
300
+ if utils.match_response(http_res, "4XX", "*"):
301
+ http_res_text = await utils.stream_to_text_async(http_res)
302
+ raise errors.APIError("API error occurred", http_res, http_res_text)
303
+ if utils.match_response(http_res, "5XX", "*"):
304
+ http_res_text = await utils.stream_to_text_async(http_res)
305
+ raise errors.APIError("API error occurred", http_res, http_res_text)
306
+
307
+ raise errors.APIError("Unexpected response received", http_res)
gr4vy/models/__init__.py CHANGED
@@ -378,6 +378,8 @@ if TYPE_CHECKING:
378
378
  FiservInstallmentOptionsTypedDict,
379
379
  )
380
380
  from .fiservoptions import FiservOptions, FiservOptionsTypedDict
381
+ from .flow import Flow
382
+ from .flowaction import FlowAction
381
383
  from .forterantifraudoptions import (
382
384
  ForterAntiFraudOptions,
383
385
  ForterAntiFraudOptionsDeliveryType,
@@ -727,6 +729,12 @@ if TYPE_CHECKING:
727
729
  ListReportsResponse,
728
730
  ListReportsResponseTypedDict,
729
731
  )
732
+ from .list_transaction_actionsop import (
733
+ ListTransactionActionsGlobals,
734
+ ListTransactionActionsGlobalsTypedDict,
735
+ ListTransactionActionsRequest,
736
+ ListTransactionActionsRequestTypedDict,
737
+ )
730
738
  from .list_transaction_eventsop import (
731
739
  ListTransactionEventsGlobals,
732
740
  ListTransactionEventsGlobalsTypedDict,
@@ -1016,6 +1024,8 @@ if TYPE_CHECKING:
1016
1024
  TokenPaymentMethodCreateTypedDict,
1017
1025
  )
1018
1026
  from .transaction import Transaction, TransactionTypedDict
1027
+ from .transactionaction import TransactionAction, TransactionActionTypedDict
1028
+ from .transactionactions import TransactionActions, TransactionActionsTypedDict
1019
1029
  from .transactionbuyer import TransactionBuyer, TransactionBuyerTypedDict
1020
1030
  from .transactioncancel import TransactionCancel, TransactionCancelTypedDict
1021
1031
  from .transactioncapture import TransactionCapture, TransactionCaptureTypedDict
@@ -1470,6 +1480,8 @@ __all__ = [
1470
1480
  "FiservInstallmentOptionsTypedDict",
1471
1481
  "FiservOptions",
1472
1482
  "FiservOptionsTypedDict",
1483
+ "Flow",
1484
+ "FlowAction",
1473
1485
  "ForterAntiFraudOptions",
1474
1486
  "ForterAntiFraudOptionsCartItem",
1475
1487
  "ForterAntiFraudOptionsCartItemBasicItemData",
@@ -1714,6 +1726,10 @@ __all__ = [
1714
1726
  "ListReportsRequestTypedDict",
1715
1727
  "ListReportsResponse",
1716
1728
  "ListReportsResponseTypedDict",
1729
+ "ListTransactionActionsGlobals",
1730
+ "ListTransactionActionsGlobalsTypedDict",
1731
+ "ListTransactionActionsRequest",
1732
+ "ListTransactionActionsRequestTypedDict",
1717
1733
  "ListTransactionEventsGlobals",
1718
1734
  "ListTransactionEventsGlobalsTypedDict",
1719
1735
  "ListTransactionEventsRequest",
@@ -1976,6 +1992,10 @@ __all__ = [
1976
1992
  "TokenPaymentMethodCreateTypedDict",
1977
1993
  "TokenTypedDict",
1978
1994
  "Transaction",
1995
+ "TransactionAction",
1996
+ "TransactionActionTypedDict",
1997
+ "TransactionActions",
1998
+ "TransactionActionsTypedDict",
1979
1999
  "TransactionBuyer",
1980
2000
  "TransactionBuyerTypedDict",
1981
2001
  "TransactionCancel",
@@ -2389,6 +2409,8 @@ _dynamic_imports: dict[str, str] = {
2389
2409
  "FiservInstallmentOptionsTypedDict": ".fiservinstallmentoptions",
2390
2410
  "FiservOptions": ".fiservoptions",
2391
2411
  "FiservOptionsTypedDict": ".fiservoptions",
2412
+ "Flow": ".flow",
2413
+ "FlowAction": ".flowaction",
2392
2414
  "ForterAntiFraudOptions": ".forterantifraudoptions",
2393
2415
  "ForterAntiFraudOptionsDeliveryType": ".forterantifraudoptions",
2394
2416
  "ForterAntiFraudOptionsTypedDict": ".forterantifraudoptions",
@@ -2634,6 +2656,10 @@ _dynamic_imports: dict[str, str] = {
2634
2656
  "ListReportsRequestTypedDict": ".list_reportsop",
2635
2657
  "ListReportsResponse": ".list_reportsop",
2636
2658
  "ListReportsResponseTypedDict": ".list_reportsop",
2659
+ "ListTransactionActionsGlobals": ".list_transaction_actionsop",
2660
+ "ListTransactionActionsGlobalsTypedDict": ".list_transaction_actionsop",
2661
+ "ListTransactionActionsRequest": ".list_transaction_actionsop",
2662
+ "ListTransactionActionsRequestTypedDict": ".list_transaction_actionsop",
2637
2663
  "ListTransactionEventsGlobals": ".list_transaction_eventsop",
2638
2664
  "ListTransactionEventsGlobalsTypedDict": ".list_transaction_eventsop",
2639
2665
  "ListTransactionEventsRequest": ".list_transaction_eventsop",
@@ -2883,6 +2909,10 @@ _dynamic_imports: dict[str, str] = {
2883
2909
  "TokenPaymentMethodCreateTypedDict": ".tokenpaymentmethodcreate",
2884
2910
  "Transaction": ".transaction",
2885
2911
  "TransactionTypedDict": ".transaction",
2912
+ "TransactionAction": ".transactionaction",
2913
+ "TransactionActionTypedDict": ".transactionaction",
2914
+ "TransactionActions": ".transactionactions",
2915
+ "TransactionActionsTypedDict": ".transactionactions",
2886
2916
  "TransactionBuyer": ".transactionbuyer",
2887
2917
  "TransactionBuyerTypedDict": ".transactionbuyer",
2888
2918
  "TransactionCancel": ".transactioncancel",
gr4vy/models/flow.py ADDED
@@ -0,0 +1,16 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from gr4vy.types import UnrecognizedStr
5
+ from typing import Literal, Union
6
+
7
+
8
+ Flow = Union[
9
+ Literal[
10
+ "checkout",
11
+ "card-transaction",
12
+ "non-card-transaction",
13
+ "redirect-transaction",
14
+ ],
15
+ UnrecognizedStr,
16
+ ]
@@ -0,0 +1,16 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from gr4vy.types import UnrecognizedStr
5
+ from typing import Literal, Union
6
+
7
+
8
+ FlowAction = Union[
9
+ Literal[
10
+ "select-payment-options",
11
+ "route-transaction",
12
+ "decline-early",
13
+ "skip-3ds",
14
+ ],
15
+ UnrecognizedStr,
16
+ ]
@@ -0,0 +1,43 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from gr4vy.types import BaseModel
5
+ from gr4vy.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
6
+ import pydantic
7
+ from typing import Optional
8
+ from typing_extensions import Annotated, NotRequired, TypedDict
9
+
10
+
11
+ class ListTransactionActionsGlobalsTypedDict(TypedDict):
12
+ merchant_account_id: NotRequired[str]
13
+ r"""The ID of the merchant account to use for this request."""
14
+
15
+
16
+ class ListTransactionActionsGlobals(BaseModel):
17
+ merchant_account_id: Annotated[
18
+ Optional[str],
19
+ pydantic.Field(alias="x-gr4vy-merchant-account-id"),
20
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
21
+ ] = None
22
+ r"""The ID of the merchant account to use for this request."""
23
+
24
+
25
+ class ListTransactionActionsRequestTypedDict(TypedDict):
26
+ transaction_id: str
27
+ r"""The ID of the transaction"""
28
+ merchant_account_id: NotRequired[str]
29
+ r"""The ID of the merchant account to use for this request."""
30
+
31
+
32
+ class ListTransactionActionsRequest(BaseModel):
33
+ transaction_id: Annotated[
34
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
35
+ ]
36
+ r"""The ID of the transaction"""
37
+
38
+ merchant_account_id: Annotated[
39
+ Optional[str],
40
+ pydantic.Field(alias="x-gr4vy-merchant-account-id"),
41
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
42
+ ] = None
43
+ r"""The ID of the merchant account to use for this request."""
@@ -0,0 +1,48 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .flow import Flow
5
+ from .flowaction import FlowAction
6
+ from datetime import datetime
7
+ from gr4vy.types import BaseModel
8
+ from gr4vy.utils import validate_const, validate_open_enum
9
+ import pydantic
10
+ from pydantic.functional_validators import AfterValidator, PlainValidator
11
+ from typing import Any, Dict, Literal, Optional
12
+ from typing_extensions import Annotated, TypedDict
13
+
14
+
15
+ class TransactionActionTypedDict(TypedDict):
16
+ id: FlowAction
17
+ flow: Flow
18
+ rule_id: str
19
+ r"""The ID of the rule that triggered this action."""
20
+ created_at: datetime
21
+ r"""The date this action was created at."""
22
+ outcome: Dict[str, Any]
23
+ r"""The outcome of the action."""
24
+ type: Literal["action"]
25
+ r"""Always `action`."""
26
+
27
+
28
+ class TransactionAction(BaseModel):
29
+ id: Annotated[FlowAction, PlainValidator(validate_open_enum(False))]
30
+
31
+ flow: Annotated[Flow, PlainValidator(validate_open_enum(False))]
32
+
33
+ rule_id: str
34
+ r"""The ID of the rule that triggered this action."""
35
+
36
+ created_at: datetime
37
+ r"""The date this action was created at."""
38
+
39
+ outcome: Dict[str, Any]
40
+ r"""The outcome of the action."""
41
+
42
+ TYPE: Annotated[
43
+ Annotated[
44
+ Optional[Literal["action"]], AfterValidator(validate_const("action"))
45
+ ],
46
+ pydantic.Field(alias="type"),
47
+ ] = "action"
48
+ r"""Always `action`."""
@@ -0,0 +1,17 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .transactionaction import TransactionAction, TransactionActionTypedDict
5
+ from gr4vy.types import BaseModel
6
+ from typing import List
7
+ from typing_extensions import TypedDict
8
+
9
+
10
+ class TransactionActionsTypedDict(TypedDict):
11
+ items: List[TransactionActionTypedDict]
12
+ r"""The list of actions triggered for a transaction."""
13
+
14
+
15
+ class TransactionActions(BaseModel):
16
+ items: List[TransactionAction]
17
+ r"""The list of actions triggered for a transaction."""
gr4vy/transactions.py CHANGED
@@ -5,6 +5,7 @@ from .sdkconfiguration import SDKConfiguration
5
5
  from datetime import datetime
6
6
  from gr4vy import errors, models, utils
7
7
  from gr4vy._hooks import HookContext
8
+ from gr4vy.actions import Actions
8
9
  from gr4vy.events import Events
9
10
  from gr4vy.transactions_refunds import TransactionsRefunds
10
11
  from gr4vy.transactions_settlements import TransactionsSettlements
@@ -17,6 +18,7 @@ from typing import Any, Dict, List, Mapping, Optional, Union
17
18
 
18
19
  class Transactions(BaseSDK):
19
20
  refunds: TransactionsRefunds
21
+ actions: Actions
20
22
  events: Events
21
23
  settlements: TransactionsSettlements
22
24
 
@@ -31,6 +33,7 @@ class Transactions(BaseSDK):
31
33
  self.refunds = TransactionsRefunds(
32
34
  self.sdk_configuration, parent_ref=self.parent_ref
33
35
  )
36
+ self.actions = Actions(self.sdk_configuration, parent_ref=self.parent_ref)
34
37
  self.events = Events(self.sdk_configuration, parent_ref=self.parent_ref)
35
38
  self.settlements = TransactionsSettlements(
36
39
  self.sdk_configuration, parent_ref=self.parent_ref
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gr4vy
3
- Version: 1.10.6
3
+ Version: 1.10.7
4
4
  Summary: Python Client SDK Generated by Speakeasy.
5
5
  Author: Gr4vy
6
6
  Requires-Python: >=3.9.2
@@ -490,6 +490,10 @@ except ValueError as error:
490
490
  * [cancel](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/transactions/README.md#cancel) - Cancel transaction
491
491
  * [sync](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/transactions/README.md#sync) - Sync transaction
492
492
 
493
+ #### [Transactions.Actions](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/actions/README.md)
494
+
495
+ * [list](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/actions/README.md#list) - Get Flow actions for transaction
496
+
493
497
  #### [Transactions.Events](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/events/README.md)
494
498
 
495
499
  * [list](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/events/README.md#list) - List transaction events
@@ -2,8 +2,9 @@ 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=rywUx4LMpO-bKESqj_ZYlw7qADYfOjy6AgYuyGga-Ws,454
5
+ gr4vy/_version.py,sha256=fdviHtG8AQ49plCEsfQWDazHCrYBAqp-N9TWwzsJRGQ,454
6
6
  gr4vy/account_updater.py,sha256=mmTd25Oap80PBqQ3p4MvZ_buT5VS0zWc8s8cqfI7iyA,607
7
+ gr4vy/actions.py,sha256=khFtgK0AmOmYhhOsGXeLAtN5YsWsWVkpDRZnciaqZFI,14008
7
8
  gr4vy/all.py,sha256=dSRtcZcQ7gc9MYmgUFdExz077A5UjbLns7Zg48BQPtg,15248
8
9
  gr4vy/audit_logs.py,sha256=xbdj2X5OfgDu8SE5yk8aRlJcNlU-k7AZRFTQMGJGGVM,17159
9
10
  gr4vy/auth.py,sha256=gxS5MjLUA0r1mSZADniCIQV4khqAn7FMvrTh-9Czm1g,8714
@@ -40,7 +41,7 @@ gr4vy/gift_cards_sdk.py,sha256=Jbd6p4M8u-_n2y727-uD-7FuQcnV1a2xy4eOacUznCY,57715
40
41
  gr4vy/httpclient.py,sha256=dqTPONDBpRn4ktXfcetQiRXnG93f0pJkFhqsYFhLUac,3945
41
42
  gr4vy/jobs.py,sha256=tJe0qDHFSNbZgUL9r3AkyVVmkxszX2Qw8N8SkhvRDgo,14641
42
43
  gr4vy/merchant_accounts_sdk.py,sha256=wBpZs-xeBU5ro32k-tkDgPPYmpMsA_DgjBQfmEsFZrs,82551
43
- gr4vy/models/__init__.py,sha256=ykv-YuZPvmCt6LvzyFh89Ry2UfKd0H1Sz9mzOdRRrXQ,135076
44
+ gr4vy/models/__init__.py,sha256=MVohbs0FW5Jl9MtGVANnFD-MxX_K_pZqkN5EU8_tORc,136403
44
45
  gr4vy/models/accountsreceivablesreportspec.py,sha256=X4YKJ5TII4KFi1I47BYt1Egxsfs84EaqXsb7g90IpLw,1012
45
46
  gr4vy/models/accountupdaterinquirysummary.py,sha256=rOJn5uG7cNFUkd6BbsAve6ueUlAJzU5_d_zeDu6RBTg,1097
46
47
  gr4vy/models/accountupdaterjob.py,sha256=JKuRwrc5yYSAQ9lD5Ta4MALtfXBF7tn_37lllQsH2B0,1972
@@ -158,6 +159,8 @@ gr4vy/models/expire_payment_linkop.py,sha256=8mht-4go2WIZ952xjblCr604EBVjY90VV-l
158
159
  gr4vy/models/field.py,sha256=0RhyjGKhi2VQ2nwpccNa8VebJbRM2fnVL_Tophp_SeA,572
159
160
  gr4vy/models/fiservinstallmentoptions.py,sha256=gkEIrbECotEMSZ1uzjxQ-q6CM1q6s_0P5LOuKychFTA,3174
160
161
  gr4vy/models/fiservoptions.py,sha256=vrA5y1DRsVbFFZ3y1f3y9XZWahrPtAPa0uYr-dZ5Xf0,1885
162
+ gr4vy/models/flow.py,sha256=pWXKNR5Q-07kvLEOdwSefkbwAlQeA6PeFNQ5lWPrJVI,353
163
+ gr4vy/models/flowaction.py,sha256=oY6vlXvtcea7zBvRJwTO_VQM-5DvuiwubUk-HmPDowI,355
161
164
  gr4vy/models/forterantifraudoptions.py,sha256=ZdH4nFBPoFiCzpXGcge1s9aAeK0fSqqXuzkxXQ-uOR8,3457
162
165
  gr4vy/models/forterantifraudoptionscartitem.py,sha256=Pp0YWzKCgwMM_RyZVyFd2q9vwNWQJ8cZsr6yJW3lfcM,2923
163
166
  gr4vy/models/forterantifraudoptionscartitembasicitemdata.py,sha256=MZ-FP7_7VN49N1f3SjXUyExUHAqzKKm-biLs7i-NTWo,2073
@@ -235,6 +238,7 @@ gr4vy/models/list_payment_servicesop.py,sha256=ZG0NLYVuJH3xpS_nIp_E-69MzdY6xW3Nq
235
238
  gr4vy/models/list_payoutsop.py,sha256=ODJKj2lqi1GGrjqeD4TVx-BeLwppyNqAsr_Dezj_poE,3168
236
239
  gr4vy/models/list_report_executionsop.py,sha256=h_YgQsNG8oBIm73SNIpGW0XP5wGJhzmifRyk9DKkoRQ,3524
237
240
  gr4vy/models/list_reportsop.py,sha256=hUA719v8VQ6OgNAzmF4ugIrwVfxnA7tOU3vXXp5oIoI,4566
241
+ gr4vy/models/list_transaction_actionsop.py,sha256=ZD8cf57_St9DaqLjNWO-4pD5Y53uc7XdZ0y91hU7yT4,1531
238
242
  gr4vy/models/list_transaction_eventsop.py,sha256=wk83vRAbcBb8fUGbiQRv-PObaWhpsYvcjOvFqNUU134,3507
239
243
  gr4vy/models/list_transaction_refundsop.py,sha256=-JDjz-RkU744XcBZ3m7IN1ZIL0WqZMOyP9ld6dWkz3w,1531
240
244
  gr4vy/models/list_transaction_settlementsop.py,sha256=iS5odOFlm4uCMMmcrWDe5Sj6EQCLjubLpaw8zscx6-g,1579
@@ -352,6 +356,8 @@ gr4vy/models/threedsecurestatus.py,sha256=ok7YxtoF76wJY9htTMKVmZqGWwDkVQPdFs3lEo
352
356
  gr4vy/models/threedsecurev2.py,sha256=tbl7LU6hrQaC-stDPQYXJApr62A2HgJD17YvD06IsnU,2441
353
357
  gr4vy/models/tokenpaymentmethodcreate.py,sha256=vuhZCgZvu9d7U7DAjBN6Bx8tJ29Yx-LCxrmijXaWUj0,2681
354
358
  gr4vy/models/transaction.py,sha256=L4fCFD6ZBAMjmbUhWduxXMtgr5mQXjUf40P6YP7b-20,25295
359
+ gr4vy/models/transactionaction.py,sha256=XhcSENQ6cZz61lzlqCjZ1moE4T-n84TZpqxsnY5hZ1o,1444
360
+ gr4vy/models/transactionactions.py,sha256=IKRIPaywhXDxaBGiAzRwQUCA95O6MUT9z9d3R_-J8TI,569
355
361
  gr4vy/models/transactionbuyer.py,sha256=eSEbXcZMur5RmSWHLlW6W_Gqg8mIv9Rfrjn6J00kCYM,3043
356
362
  gr4vy/models/transactioncancel.py,sha256=OHP0xmmM374aaYXPeV0G2fZn5RRfxbTAzJnNospfCas,3162
357
363
  gr4vy/models/transactioncapture.py,sha256=7WD3uoUyDJ1sejtjIb7b5B5BFtpKEi7KkegVtB0DLTg,3174
@@ -416,7 +422,7 @@ gr4vy/reports_sdk.py,sha256=HI6IZI5tSeSUsSmUNS4ypNHapFN0wUQ86iLDCr9SAZ4,59929
416
422
  gr4vy/sdk.py,sha256=2hfDkFfqPXyFR8w4J0joQrk_5xirotLtFrRYu5glAq4,10519
417
423
  gr4vy/sdkconfiguration.py,sha256=aBQ8gY9aOjf1TL0kSLat8hEIoH4lCE9_PhihyhBpRE4,1985
418
424
  gr4vy/sessions.py,sha256=AA32Wu6OmJbJ7GdypptwmK31SbZH4VLLuo3gnzD4nJE,41837
419
- gr4vy/transactions.py,sha256=WBzistkxpQdvGKgHWmV9dK7wXphlLr58figWID7YWck,170033
425
+ gr4vy/transactions.py,sha256=AVrfVtnsw4PfNUIwjDMVQrOMThuNUX09wU54D4yofnU,170171
420
426
  gr4vy/transactions_refunds.py,sha256=mAzll7rTt7VV0n7wHlAfK5KY81JhWJ1333KjXXGOdFo,43819
421
427
  gr4vy/transactions_settlements.py,sha256=oxVGRIMmcwKhZWN0KWW1Wm3831m5y55SU17LMRaKmEM,27902
422
428
  gr4vy/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
@@ -439,6 +445,6 @@ gr4vy/utils/unmarshal_json_response.py,sha256=G4h8gLOK09kjhPiUZjgIMm6zntcbxpvb_m
439
445
  gr4vy/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
440
446
  gr4vy/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
441
447
  gr4vy/webhooks.py,sha256=2L-ZhdK-XU2X0AkVqgZvhfRqDCKUVs7R4UNCmZJR78w,1359
442
- gr4vy-1.10.6.dist-info/METADATA,sha256=Q77HoZ8vT4NBuuCEQBbZyrWYuBlxwzUgf4wBrI2SFOw,44066
443
- gr4vy-1.10.6.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
444
- gr4vy-1.10.6.dist-info/RECORD,,
448
+ gr4vy-1.10.7.dist-info/METADATA,sha256=V9uRMBNxh92ZLvK1RHEnknwLtC8N_bs9IxoMSo5bV9Y,44303
449
+ gr4vy-1.10.7.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
450
+ gr4vy-1.10.7.dist-info/RECORD,,
File without changes