gr4vy 1.1.35__py3-none-any.whl → 1.2.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.1.35"
6
+ __version__: str = "1.2.1"
7
7
  __openapi_doc_version__: str = "1.0.0"
8
- __gen_version__: str = "2.686.7"
9
- __user_agent__: str = "speakeasy-sdk/python 1.1.35 2.686.7 1.0.0 gr4vy"
8
+ __gen_version__: str = "2.687.13"
9
+ __user_agent__: str = "speakeasy-sdk/python 1.2.1 2.687.13 1.0.0 gr4vy"
10
10
 
11
11
  try:
12
12
  if __package__ is not None:
gr4vy/account_updater.py CHANGED
@@ -3,15 +3,18 @@
3
3
  from .basesdk import BaseSDK
4
4
  from .sdkconfiguration import SDKConfiguration
5
5
  from gr4vy.jobs import Jobs
6
+ from typing import Optional
6
7
 
7
8
 
8
9
  class AccountUpdater(BaseSDK):
9
10
  jobs: Jobs
10
11
 
11
- def __init__(self, sdk_config: SDKConfiguration) -> None:
12
- BaseSDK.__init__(self, sdk_config)
12
+ def __init__(
13
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
14
+ ) -> None:
15
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
13
16
  self.sdk_configuration = sdk_config
14
17
  self._init_sdks()
15
18
 
16
19
  def _init_sdks(self):
17
- self.jobs = Jobs(self.sdk_configuration)
20
+ self.jobs = Jobs(self.sdk_configuration, parent_ref=self.parent_ref)
gr4vy/basesdk.py CHANGED
@@ -11,9 +11,19 @@ from urllib.parse import parse_qs, urlparse
11
11
 
12
12
  class BaseSDK:
13
13
  sdk_configuration: SDKConfiguration
14
+ parent_ref: Optional[object] = None
15
+ """
16
+ Reference to the root SDK instance, if any. This will prevent it from
17
+ being garbage collected while there are active streams.
18
+ """
14
19
 
15
- def __init__(self, sdk_config: SDKConfiguration) -> None:
20
+ def __init__(
21
+ self,
22
+ sdk_config: SDKConfiguration,
23
+ parent_ref: Optional[object] = None,
24
+ ) -> None:
16
25
  self.sdk_configuration = sdk_config
26
+ self.parent_ref = parent_ref
17
27
 
18
28
  def _get_url(self, base_url, url_variables):
19
29
  sdk_url, sdk_variables = self.sdk_configuration.get_server_details()
gr4vy/buyers_sdk.py CHANGED
@@ -19,15 +19,23 @@ class BuyersSDK(BaseSDK):
19
19
  gift_cards: BuyersGiftCards
20
20
  shipping_details: BuyersShippingDetails
21
21
 
22
- def __init__(self, sdk_config: SDKConfiguration) -> None:
23
- BaseSDK.__init__(self, sdk_config)
22
+ def __init__(
23
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
24
+ ) -> None:
25
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
24
26
  self.sdk_configuration = sdk_config
25
27
  self._init_sdks()
26
28
 
27
29
  def _init_sdks(self):
28
- self.payment_methods = BuyersPaymentMethods(self.sdk_configuration)
29
- self.gift_cards = BuyersGiftCards(self.sdk_configuration)
30
- self.shipping_details = BuyersShippingDetails(self.sdk_configuration)
30
+ self.payment_methods = BuyersPaymentMethods(
31
+ self.sdk_configuration, parent_ref=self.parent_ref
32
+ )
33
+ self.gift_cards = BuyersGiftCards(
34
+ self.sdk_configuration, parent_ref=self.parent_ref
35
+ )
36
+ self.shipping_details = BuyersShippingDetails(
37
+ self.sdk_configuration, parent_ref=self.parent_ref
38
+ )
31
39
 
32
40
  def list(
33
41
  self,
@@ -16,14 +16,16 @@ class DigitalWalletsSDK(BaseSDK):
16
16
  sessions: Sessions
17
17
  domains: Domains
18
18
 
19
- def __init__(self, sdk_config: SDKConfiguration) -> None:
20
- BaseSDK.__init__(self, sdk_config)
19
+ def __init__(
20
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
21
+ ) -> None:
22
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
21
23
  self.sdk_configuration = sdk_config
22
24
  self._init_sdks()
23
25
 
24
26
  def _init_sdks(self):
25
- self.sessions = Sessions(self.sdk_configuration)
26
- self.domains = Domains(self.sdk_configuration)
27
+ self.sessions = Sessions(self.sdk_configuration, parent_ref=self.parent_ref)
28
+ self.domains = Domains(self.sdk_configuration, parent_ref=self.parent_ref)
27
29
 
28
30
  def create(
29
31
  self,
gr4vy/errors/__init__.py CHANGED
@@ -1,8 +1,10 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
+ from .gr4vyerror import Gr4vyError
3
4
  from typing import TYPE_CHECKING
4
5
  from importlib import import_module
5
6
  import builtins
7
+ import sys
6
8
 
7
9
  if TYPE_CHECKING:
8
10
  from .apierror import APIError
@@ -17,7 +19,6 @@ if TYPE_CHECKING:
17
19
  from .error500 import Error500, Error500Data
18
20
  from .error502 import Error502, Error502Data
19
21
  from .error504 import Error504, Error504Data
20
- from .gr4vyerror import Gr4vyError
21
22
  from .httpvalidationerror import HTTPValidationError, HTTPValidationErrorData
22
23
  from .no_response_error import NoResponseError
23
24
  from .responsevalidationerror import ResponseValidationError
@@ -77,7 +78,6 @@ _dynamic_imports: dict[str, str] = {
77
78
  "Error502Data": ".error502",
78
79
  "Error504": ".error504",
79
80
  "Error504Data": ".error504",
80
- "Gr4vyError": ".gr4vyerror",
81
81
  "HTTPValidationError": ".httpvalidationerror",
82
82
  "HTTPValidationErrorData": ".httpvalidationerror",
83
83
  "NoResponseError": ".no_response_error",
@@ -85,6 +85,18 @@ _dynamic_imports: dict[str, str] = {
85
85
  }
86
86
 
87
87
 
88
+ def dynamic_import(modname, retries=3):
89
+ for attempt in range(retries):
90
+ try:
91
+ return import_module(modname, __package__)
92
+ except KeyError:
93
+ # Clear any half-initialized module and retry
94
+ sys.modules.pop(modname, None)
95
+ if attempt == retries - 1:
96
+ break
97
+ raise KeyError(f"Failed to import module '{modname}' after {retries} attempts")
98
+
99
+
88
100
  def __getattr__(attr_name: str) -> object:
89
101
  module_name = _dynamic_imports.get(attr_name)
90
102
  if module_name is None:
@@ -93,7 +105,7 @@ def __getattr__(attr_name: str) -> object:
93
105
  )
94
106
 
95
107
  try:
96
- module = import_module(module_name, __package__)
108
+ module = dynamic_import(module_name)
97
109
  result = getattr(module, attr_name)
98
110
  return result
99
111
  except ImportError as e:
gr4vy/gift_cards_sdk.py CHANGED
@@ -15,13 +15,15 @@ from typing import Any, Dict, List, Mapping, Optional, Union
15
15
  class GiftCardsSDK(BaseSDK):
16
16
  balances: Balances
17
17
 
18
- def __init__(self, sdk_config: SDKConfiguration) -> None:
19
- BaseSDK.__init__(self, sdk_config)
18
+ def __init__(
19
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
20
+ ) -> None:
21
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
20
22
  self.sdk_configuration = sdk_config
21
23
  self._init_sdks()
22
24
 
23
25
  def _init_sdks(self):
24
- self.balances = Balances(self.sdk_configuration)
26
+ self.balances = Balances(self.sdk_configuration, parent_ref=self.parent_ref)
25
27
 
26
28
  def get(
27
29
  self,
gr4vy/models/__init__.py CHANGED
@@ -3,6 +3,7 @@
3
3
  from typing import TYPE_CHECKING
4
4
  from importlib import import_module
5
5
  import builtins
6
+ import sys
6
7
 
7
8
  if TYPE_CHECKING:
8
9
  from .accountsreceivablesreportspec import (
@@ -96,6 +97,13 @@ if TYPE_CHECKING:
96
97
  from .buyercreate import BuyerCreate, BuyerCreateTypedDict
97
98
  from .buyers import Buyers, BuyersTypedDict
98
99
  from .buyerupdate import BuyerUpdate, BuyerUpdateTypedDict
100
+ from .cancel_transactionop import (
101
+ CancelTransactionGlobals,
102
+ CancelTransactionGlobalsTypedDict,
103
+ CancelTransactionRequest,
104
+ CancelTransactionRequestTypedDict,
105
+ )
106
+ from .cancelstatus import CancelStatus
99
107
  from .capture_transactionop import (
100
108
  CaptureTransactionGlobals,
101
109
  CaptureTransactionGlobalsTypedDict,
@@ -976,6 +984,7 @@ if TYPE_CHECKING:
976
984
  )
977
985
  from .transaction import Transaction, TransactionTypedDict
978
986
  from .transactionbuyer import TransactionBuyer, TransactionBuyerTypedDict
987
+ from .transactioncancel import TransactionCancel, TransactionCancelTypedDict
979
988
  from .transactioncapture import TransactionCapture, TransactionCaptureTypedDict
980
989
  from .transactioncapturecreate import (
981
990
  TransactionCaptureCreate,
@@ -1223,6 +1232,11 @@ __all__ = [
1223
1232
  "Buyers",
1224
1233
  "BuyersTypedDict",
1225
1234
  "CVVResponseCode",
1235
+ "CancelStatus",
1236
+ "CancelTransactionGlobals",
1237
+ "CancelTransactionGlobalsTypedDict",
1238
+ "CancelTransactionRequest",
1239
+ "CancelTransactionRequestTypedDict",
1226
1240
  "CaptureStatus",
1227
1241
  "CaptureTransactionGlobals",
1228
1242
  "CaptureTransactionGlobalsTypedDict",
@@ -1906,6 +1920,8 @@ __all__ = [
1906
1920
  "Transaction",
1907
1921
  "TransactionBuyer",
1908
1922
  "TransactionBuyerTypedDict",
1923
+ "TransactionCancel",
1924
+ "TransactionCancelTypedDict",
1909
1925
  "TransactionCapture",
1910
1926
  "TransactionCaptureCreate",
1911
1927
  "TransactionCaptureCreateTypedDict",
@@ -2108,6 +2124,11 @@ _dynamic_imports: dict[str, str] = {
2108
2124
  "BuyersTypedDict": ".buyers",
2109
2125
  "BuyerUpdate": ".buyerupdate",
2110
2126
  "BuyerUpdateTypedDict": ".buyerupdate",
2127
+ "CancelTransactionGlobals": ".cancel_transactionop",
2128
+ "CancelTransactionGlobalsTypedDict": ".cancel_transactionop",
2129
+ "CancelTransactionRequest": ".cancel_transactionop",
2130
+ "CancelTransactionRequestTypedDict": ".cancel_transactionop",
2131
+ "CancelStatus": ".cancelstatus",
2111
2132
  "CaptureTransactionGlobals": ".capture_transactionop",
2112
2133
  "CaptureTransactionGlobalsTypedDict": ".capture_transactionop",
2113
2134
  "CaptureTransactionRequest": ".capture_transactionop",
@@ -2783,6 +2804,8 @@ _dynamic_imports: dict[str, str] = {
2783
2804
  "TransactionTypedDict": ".transaction",
2784
2805
  "TransactionBuyer": ".transactionbuyer",
2785
2806
  "TransactionBuyerTypedDict": ".transactionbuyer",
2807
+ "TransactionCancel": ".transactioncancel",
2808
+ "TransactionCancelTypedDict": ".transactioncancel",
2786
2809
  "TransactionCapture": ".transactioncapture",
2787
2810
  "TransactionCaptureTypedDict": ".transactioncapture",
2788
2811
  "TransactionCaptureCreate": ".transactioncapturecreate",
@@ -2905,6 +2928,18 @@ _dynamic_imports: dict[str, str] = {
2905
2928
  }
2906
2929
 
2907
2930
 
2931
+ def dynamic_import(modname, retries=3):
2932
+ for attempt in range(retries):
2933
+ try:
2934
+ return import_module(modname, __package__)
2935
+ except KeyError:
2936
+ # Clear any half-initialized module and retry
2937
+ sys.modules.pop(modname, None)
2938
+ if attempt == retries - 1:
2939
+ break
2940
+ raise KeyError(f"Failed to import module '{modname}' after {retries} attempts")
2941
+
2942
+
2908
2943
  def __getattr__(attr_name: str) -> object:
2909
2944
  module_name = _dynamic_imports.get(attr_name)
2910
2945
  if module_name is None:
@@ -2913,7 +2948,7 @@ def __getattr__(attr_name: str) -> object:
2913
2948
  )
2914
2949
 
2915
2950
  try:
2916
- module = import_module(module_name, __package__)
2951
+ module = dynamic_import(module_name)
2917
2952
  result = getattr(module, attr_name)
2918
2953
  return result
2919
2954
  except ImportError as e:
@@ -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 CancelTransactionGlobalsTypedDict(TypedDict):
12
+ merchant_account_id: NotRequired[str]
13
+ r"""The ID of the merchant account to use for this request."""
14
+
15
+
16
+ class CancelTransactionGlobals(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 CancelTransactionRequestTypedDict(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 CancelTransactionRequest(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,8 @@
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
+ CancelStatus = Union[Literal["succeeded", "pending", "failed"], UnrecognizedStr]
@@ -3,6 +3,7 @@
3
3
  from typing import TYPE_CHECKING
4
4
  from importlib import import_module
5
5
  import builtins
6
+ import sys
6
7
 
7
8
  if TYPE_CHECKING:
8
9
  from .globals import Globals, GlobalsTypedDict
@@ -15,6 +16,18 @@ _dynamic_imports: dict[str, str] = {
15
16
  }
16
17
 
17
18
 
19
+ def dynamic_import(modname, retries=3):
20
+ for attempt in range(retries):
21
+ try:
22
+ return import_module(modname, __package__)
23
+ except KeyError:
24
+ # Clear any half-initialized module and retry
25
+ sys.modules.pop(modname, None)
26
+ if attempt == retries - 1:
27
+ break
28
+ raise KeyError(f"Failed to import module '{modname}' after {retries} attempts")
29
+
30
+
18
31
  def __getattr__(attr_name: str) -> object:
19
32
  module_name = _dynamic_imports.get(attr_name)
20
33
  if module_name is None:
@@ -23,7 +36,7 @@ def __getattr__(attr_name: str) -> object:
23
36
  )
24
37
 
25
38
  try:
26
- module = import_module(module_name, __package__)
39
+ module = dynamic_import(module_name)
27
40
  result = getattr(module, attr_name)
28
41
  return result
29
42
  except ImportError as e:
@@ -0,0 +1,81 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .cancelstatus import CancelStatus
5
+ from .transaction import Transaction, TransactionTypedDict
6
+ from gr4vy.types import BaseModel, Nullable, UNSET_SENTINEL
7
+ from gr4vy.utils import validate_const, validate_open_enum
8
+ import pydantic
9
+ from pydantic import model_serializer
10
+ from pydantic.functional_validators import AfterValidator, PlainValidator
11
+ from typing import Literal, Optional
12
+ from typing_extensions import Annotated, TypedDict
13
+
14
+
15
+ class TransactionCancelTypedDict(TypedDict):
16
+ status: CancelStatus
17
+ code: Nullable[str]
18
+ r"""The standardized error code set by Gr4vy."""
19
+ raw_response_code: Nullable[str]
20
+ r"""This is the response code received from the payment service. This can be set to any value and is not standardized across different payment services."""
21
+ raw_response_description: Nullable[str]
22
+ r"""This is the response description received from the payment service. This can be set to any value and is not standardized across different payment services."""
23
+ transaction: TransactionTypedDict
24
+ r"""A full transaction resource."""
25
+ type: Literal["transaction-cancel"]
26
+ r"""Always `transaction-cancel`."""
27
+
28
+
29
+ class TransactionCancel(BaseModel):
30
+ status: Annotated[CancelStatus, PlainValidator(validate_open_enum(False))]
31
+
32
+ code: Nullable[str]
33
+ r"""The standardized error code set by Gr4vy."""
34
+
35
+ raw_response_code: Nullable[str]
36
+ r"""This is the response code received from the payment service. This can be set to any value and is not standardized across different payment services."""
37
+
38
+ raw_response_description: Nullable[str]
39
+ r"""This is the response description received from the payment service. This can be set to any value and is not standardized across different payment services."""
40
+
41
+ transaction: Transaction
42
+ r"""A full transaction resource."""
43
+
44
+ TYPE: Annotated[
45
+ Annotated[
46
+ Optional[Literal["transaction-cancel"]],
47
+ AfterValidator(validate_const("transaction-cancel")),
48
+ ],
49
+ pydantic.Field(alias="type"),
50
+ ] = "transaction-cancel"
51
+ r"""Always `transaction-cancel`."""
52
+
53
+ @model_serializer(mode="wrap")
54
+ def serialize_model(self, handler):
55
+ optional_fields = ["type"]
56
+ nullable_fields = ["code", "raw_response_code", "raw_response_description"]
57
+ null_default_fields = []
58
+
59
+ serialized = handler(self)
60
+
61
+ m = {}
62
+
63
+ for n, f in type(self).model_fields.items():
64
+ k = f.alias or n
65
+ val = serialized.get(k)
66
+ serialized.pop(k, None)
67
+
68
+ optional_nullable = k in optional_fields and k in nullable_fields
69
+ is_set = (
70
+ self.__pydantic_fields_set__.intersection({n})
71
+ or k in null_default_fields
72
+ ) # pylint: disable=no-member
73
+
74
+ if val is not None and val != UNSET_SENTINEL:
75
+ m[k] = val
76
+ elif val != UNSET_SENTINEL and (
77
+ not k in optional_fields or (optional_nullable and is_set)
78
+ ):
79
+ m[k] = val
80
+
81
+ return m
@@ -44,6 +44,7 @@ Name = Union[
44
44
  "payment-connector-response-transaction-capture-failed",
45
45
  "payment-connector-response-transaction-capture-declined",
46
46
  "payment-connector-response-transaction-cancel-succeeded",
47
+ "payment-connector-response-transaction-cancel-pending",
47
48
  "payment-connector-response-transaction-cancel-failed",
48
49
  "payment-connector-response-transaction-void-succeeded",
49
50
  "payment-connector-response-transaction-void-declined",
@@ -14,13 +14,17 @@ from typing import Any, Mapping, Optional
14
14
  class PaymentMethodsNetworkTokens(BaseSDK):
15
15
  cryptogram: NetworkTokensCryptogram
16
16
 
17
- def __init__(self, sdk_config: SDKConfiguration) -> None:
18
- BaseSDK.__init__(self, sdk_config)
17
+ def __init__(
18
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
19
+ ) -> None:
20
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
19
21
  self.sdk_configuration = sdk_config
20
22
  self._init_sdks()
21
23
 
22
24
  def _init_sdks(self):
23
- self.cryptogram = NetworkTokensCryptogram(self.sdk_configuration)
25
+ self.cryptogram = NetworkTokensCryptogram(
26
+ self.sdk_configuration, parent_ref=self.parent_ref
27
+ )
24
28
 
25
29
  def list(
26
30
  self,
@@ -19,16 +19,20 @@ class PaymentMethodsSDK(BaseSDK):
19
19
  payment_service_tokens: PaymentMethodsPaymentServiceTokens
20
20
  network_tokens: PaymentMethodsNetworkTokens
21
21
 
22
- def __init__(self, sdk_config: SDKConfiguration) -> None:
23
- BaseSDK.__init__(self, sdk_config)
22
+ def __init__(
23
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
24
+ ) -> None:
25
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
24
26
  self.sdk_configuration = sdk_config
25
27
  self._init_sdks()
26
28
 
27
29
  def _init_sdks(self):
28
30
  self.payment_service_tokens = PaymentMethodsPaymentServiceTokens(
29
- self.sdk_configuration
31
+ self.sdk_configuration, parent_ref=self.parent_ref
32
+ )
33
+ self.network_tokens = PaymentMethodsNetworkTokens(
34
+ self.sdk_configuration, parent_ref=self.parent_ref
30
35
  )
31
- self.network_tokens = PaymentMethodsNetworkTokens(self.sdk_configuration)
32
36
 
33
37
  def list(
34
38
  self,
gr4vy/reports_sdk.py CHANGED
@@ -15,13 +15,15 @@ from typing import Any, Dict, List, Mapping, Optional, Union
15
15
  class ReportsSDK(BaseSDK):
16
16
  executions: Executions
17
17
 
18
- def __init__(self, sdk_config: SDKConfiguration) -> None:
19
- BaseSDK.__init__(self, sdk_config)
18
+ def __init__(
19
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
20
+ ) -> None:
21
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
20
22
  self.sdk_configuration = sdk_config
21
23
  self._init_sdks()
22
24
 
23
25
  def _init_sdks(self):
24
- self.executions = Executions(self.sdk_configuration)
26
+ self.executions = Executions(self.sdk_configuration, parent_ref=self.parent_ref)
25
27
 
26
28
  def list(
27
29
  self,
gr4vy/sdk.py CHANGED
@@ -11,6 +11,7 @@ from gr4vy.models import internal
11
11
  from gr4vy.types import OptionalNullable, UNSET
12
12
  import httpx
13
13
  import importlib
14
+ import sys
14
15
  from typing import Any, Callable, Dict, Optional, TYPE_CHECKING, Union, cast
15
16
  import weakref
16
17
 
@@ -173,6 +174,7 @@ class Gr4vy(BaseSDK):
173
174
  timeout_ms=timeout_ms,
174
175
  debug_logger=debug_logger,
175
176
  ),
177
+ parent_ref=self,
176
178
  )
177
179
 
178
180
  hooks = SDKHooks()
@@ -197,13 +199,24 @@ class Gr4vy(BaseSDK):
197
199
  self.sdk_configuration.async_client_supplied,
198
200
  )
199
201
 
202
+ def dynamic_import(self, modname, retries=3):
203
+ for attempt in range(retries):
204
+ try:
205
+ return importlib.import_module(modname)
206
+ except KeyError:
207
+ # Clear any half-initialized module and retry
208
+ sys.modules.pop(modname, None)
209
+ if attempt == retries - 1:
210
+ break
211
+ raise KeyError(f"Failed to import module '{modname}' after {retries} attempts")
212
+
200
213
  def __getattr__(self, name: str):
201
214
  if name in self._sub_sdk_map:
202
215
  module_path, class_name = self._sub_sdk_map[name]
203
216
  try:
204
- module = importlib.import_module(module_path)
217
+ module = self.dynamic_import(module_path)
205
218
  klass = getattr(module, class_name)
206
- instance = klass(self.sdk_configuration)
219
+ instance = klass(self.sdk_configuration, parent_ref=self)
207
220
  setattr(self, name, instance)
208
221
  return instance
209
222
  except ImportError as e:
gr4vy/transactions.py CHANGED
@@ -20,15 +20,21 @@ class Transactions(BaseSDK):
20
20
  events: Events
21
21
  settlements: TransactionsSettlements
22
22
 
23
- def __init__(self, sdk_config: SDKConfiguration) -> None:
24
- BaseSDK.__init__(self, sdk_config)
23
+ def __init__(
24
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
25
+ ) -> None:
26
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
25
27
  self.sdk_configuration = sdk_config
26
28
  self._init_sdks()
27
29
 
28
30
  def _init_sdks(self):
29
- self.refunds = TransactionsRefunds(self.sdk_configuration)
30
- self.events = Events(self.sdk_configuration)
31
- self.settlements = TransactionsSettlements(self.sdk_configuration)
31
+ self.refunds = TransactionsRefunds(
32
+ self.sdk_configuration, parent_ref=self.parent_ref
33
+ )
34
+ self.events = Events(self.sdk_configuration, parent_ref=self.parent_ref)
35
+ self.settlements = TransactionsSettlements(
36
+ self.sdk_configuration, parent_ref=self.parent_ref
37
+ )
32
38
 
33
39
  def list(
34
40
  self,
@@ -2540,6 +2546,292 @@ class Transactions(BaseSDK):
2540
2546
 
2541
2547
  raise errors.APIError("Unexpected response received", http_res)
2542
2548
 
2549
+ def cancel(
2550
+ self,
2551
+ *,
2552
+ transaction_id: str,
2553
+ merchant_account_id: Optional[str] = None,
2554
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
2555
+ server_url: Optional[str] = None,
2556
+ timeout_ms: Optional[int] = None,
2557
+ http_headers: Optional[Mapping[str, str]] = None,
2558
+ ) -> models.TransactionCancel:
2559
+ r"""Cancel transaction
2560
+
2561
+ Cancels a pending transaction. If the transaction was successfully authorized, or was already captured, the cancel will not be processed.
2562
+
2563
+ :param transaction_id: The ID of the transaction
2564
+ :param merchant_account_id: The ID of the merchant account to use for this request.
2565
+ :param retries: Override the default retry configuration for this method
2566
+ :param server_url: Override the default server URL for this method
2567
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
2568
+ :param http_headers: Additional headers to set or replace on requests.
2569
+ """
2570
+ base_url = None
2571
+ url_variables = None
2572
+ if timeout_ms is None:
2573
+ timeout_ms = self.sdk_configuration.timeout_ms
2574
+
2575
+ if server_url is not None:
2576
+ base_url = server_url
2577
+ else:
2578
+ base_url = self._get_url(base_url, url_variables)
2579
+
2580
+ request = models.CancelTransactionRequest(
2581
+ transaction_id=transaction_id,
2582
+ merchant_account_id=merchant_account_id,
2583
+ )
2584
+
2585
+ req = self._build_request(
2586
+ method="POST",
2587
+ path="/transactions/{transaction_id}/cancel",
2588
+ base_url=base_url,
2589
+ url_variables=url_variables,
2590
+ request=request,
2591
+ request_body_required=False,
2592
+ request_has_path_params=True,
2593
+ request_has_query_params=True,
2594
+ user_agent_header="user-agent",
2595
+ accept_header_value="application/json",
2596
+ http_headers=http_headers,
2597
+ _globals=models.CancelTransactionGlobals(
2598
+ merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
2599
+ ),
2600
+ security=self.sdk_configuration.security,
2601
+ timeout_ms=timeout_ms,
2602
+ )
2603
+
2604
+ if retries == UNSET:
2605
+ if self.sdk_configuration.retry_config is not UNSET:
2606
+ retries = self.sdk_configuration.retry_config
2607
+
2608
+ retry_config = None
2609
+ if isinstance(retries, utils.RetryConfig):
2610
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
2611
+
2612
+ http_res = self.do_request(
2613
+ hook_ctx=HookContext(
2614
+ config=self.sdk_configuration,
2615
+ base_url=base_url or "",
2616
+ operation_id="cancel_transaction",
2617
+ oauth2_scopes=[],
2618
+ security_source=get_security_from_env(
2619
+ self.sdk_configuration.security, models.Security
2620
+ ),
2621
+ ),
2622
+ request=req,
2623
+ error_status_codes=[
2624
+ "400",
2625
+ "401",
2626
+ "403",
2627
+ "404",
2628
+ "405",
2629
+ "409",
2630
+ "422",
2631
+ "425",
2632
+ "429",
2633
+ "4XX",
2634
+ "500",
2635
+ "502",
2636
+ "504",
2637
+ "5XX",
2638
+ ],
2639
+ retry_config=retry_config,
2640
+ )
2641
+
2642
+ response_data: Any = None
2643
+ if utils.match_response(http_res, "200", "application/json"):
2644
+ return unmarshal_json_response(models.TransactionCancel, http_res)
2645
+ if utils.match_response(http_res, "400", "application/json"):
2646
+ response_data = unmarshal_json_response(errors.Error400Data, http_res)
2647
+ raise errors.Error400(response_data, http_res)
2648
+ if utils.match_response(http_res, "401", "application/json"):
2649
+ response_data = unmarshal_json_response(errors.Error401Data, http_res)
2650
+ raise errors.Error401(response_data, http_res)
2651
+ if utils.match_response(http_res, "403", "application/json"):
2652
+ response_data = unmarshal_json_response(errors.Error403Data, http_res)
2653
+ raise errors.Error403(response_data, http_res)
2654
+ if utils.match_response(http_res, "404", "application/json"):
2655
+ response_data = unmarshal_json_response(errors.Error404Data, http_res)
2656
+ raise errors.Error404(response_data, http_res)
2657
+ if utils.match_response(http_res, "405", "application/json"):
2658
+ response_data = unmarshal_json_response(errors.Error405Data, http_res)
2659
+ raise errors.Error405(response_data, http_res)
2660
+ if utils.match_response(http_res, "409", "application/json"):
2661
+ response_data = unmarshal_json_response(errors.Error409Data, http_res)
2662
+ raise errors.Error409(response_data, http_res)
2663
+ if utils.match_response(http_res, "422", "application/json"):
2664
+ response_data = unmarshal_json_response(
2665
+ errors.HTTPValidationErrorData, http_res
2666
+ )
2667
+ raise errors.HTTPValidationError(response_data, http_res)
2668
+ if utils.match_response(http_res, "425", "application/json"):
2669
+ response_data = unmarshal_json_response(errors.Error425Data, http_res)
2670
+ raise errors.Error425(response_data, http_res)
2671
+ if utils.match_response(http_res, "429", "application/json"):
2672
+ response_data = unmarshal_json_response(errors.Error429Data, http_res)
2673
+ raise errors.Error429(response_data, http_res)
2674
+ if utils.match_response(http_res, "500", "application/json"):
2675
+ response_data = unmarshal_json_response(errors.Error500Data, http_res)
2676
+ raise errors.Error500(response_data, http_res)
2677
+ if utils.match_response(http_res, "502", "application/json"):
2678
+ response_data = unmarshal_json_response(errors.Error502Data, http_res)
2679
+ raise errors.Error502(response_data, http_res)
2680
+ if utils.match_response(http_res, "504", "application/json"):
2681
+ response_data = unmarshal_json_response(errors.Error504Data, http_res)
2682
+ raise errors.Error504(response_data, http_res)
2683
+ if utils.match_response(http_res, "4XX", "*"):
2684
+ http_res_text = utils.stream_to_text(http_res)
2685
+ raise errors.APIError("API error occurred", http_res, http_res_text)
2686
+ if utils.match_response(http_res, "5XX", "*"):
2687
+ http_res_text = utils.stream_to_text(http_res)
2688
+ raise errors.APIError("API error occurred", http_res, http_res_text)
2689
+
2690
+ raise errors.APIError("Unexpected response received", http_res)
2691
+
2692
+ async def cancel_async(
2693
+ self,
2694
+ *,
2695
+ transaction_id: str,
2696
+ merchant_account_id: Optional[str] = None,
2697
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
2698
+ server_url: Optional[str] = None,
2699
+ timeout_ms: Optional[int] = None,
2700
+ http_headers: Optional[Mapping[str, str]] = None,
2701
+ ) -> models.TransactionCancel:
2702
+ r"""Cancel transaction
2703
+
2704
+ Cancels a pending transaction. If the transaction was successfully authorized, or was already captured, the cancel will not be processed.
2705
+
2706
+ :param transaction_id: The ID of the transaction
2707
+ :param merchant_account_id: The ID of the merchant account to use for this request.
2708
+ :param retries: Override the default retry configuration for this method
2709
+ :param server_url: Override the default server URL for this method
2710
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
2711
+ :param http_headers: Additional headers to set or replace on requests.
2712
+ """
2713
+ base_url = None
2714
+ url_variables = None
2715
+ if timeout_ms is None:
2716
+ timeout_ms = self.sdk_configuration.timeout_ms
2717
+
2718
+ if server_url is not None:
2719
+ base_url = server_url
2720
+ else:
2721
+ base_url = self._get_url(base_url, url_variables)
2722
+
2723
+ request = models.CancelTransactionRequest(
2724
+ transaction_id=transaction_id,
2725
+ merchant_account_id=merchant_account_id,
2726
+ )
2727
+
2728
+ req = self._build_request_async(
2729
+ method="POST",
2730
+ path="/transactions/{transaction_id}/cancel",
2731
+ base_url=base_url,
2732
+ url_variables=url_variables,
2733
+ request=request,
2734
+ request_body_required=False,
2735
+ request_has_path_params=True,
2736
+ request_has_query_params=True,
2737
+ user_agent_header="user-agent",
2738
+ accept_header_value="application/json",
2739
+ http_headers=http_headers,
2740
+ _globals=models.CancelTransactionGlobals(
2741
+ merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
2742
+ ),
2743
+ security=self.sdk_configuration.security,
2744
+ timeout_ms=timeout_ms,
2745
+ )
2746
+
2747
+ if retries == UNSET:
2748
+ if self.sdk_configuration.retry_config is not UNSET:
2749
+ retries = self.sdk_configuration.retry_config
2750
+
2751
+ retry_config = None
2752
+ if isinstance(retries, utils.RetryConfig):
2753
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
2754
+
2755
+ http_res = await self.do_request_async(
2756
+ hook_ctx=HookContext(
2757
+ config=self.sdk_configuration,
2758
+ base_url=base_url or "",
2759
+ operation_id="cancel_transaction",
2760
+ oauth2_scopes=[],
2761
+ security_source=get_security_from_env(
2762
+ self.sdk_configuration.security, models.Security
2763
+ ),
2764
+ ),
2765
+ request=req,
2766
+ error_status_codes=[
2767
+ "400",
2768
+ "401",
2769
+ "403",
2770
+ "404",
2771
+ "405",
2772
+ "409",
2773
+ "422",
2774
+ "425",
2775
+ "429",
2776
+ "4XX",
2777
+ "500",
2778
+ "502",
2779
+ "504",
2780
+ "5XX",
2781
+ ],
2782
+ retry_config=retry_config,
2783
+ )
2784
+
2785
+ response_data: Any = None
2786
+ if utils.match_response(http_res, "200", "application/json"):
2787
+ return unmarshal_json_response(models.TransactionCancel, http_res)
2788
+ if utils.match_response(http_res, "400", "application/json"):
2789
+ response_data = unmarshal_json_response(errors.Error400Data, http_res)
2790
+ raise errors.Error400(response_data, http_res)
2791
+ if utils.match_response(http_res, "401", "application/json"):
2792
+ response_data = unmarshal_json_response(errors.Error401Data, http_res)
2793
+ raise errors.Error401(response_data, http_res)
2794
+ if utils.match_response(http_res, "403", "application/json"):
2795
+ response_data = unmarshal_json_response(errors.Error403Data, http_res)
2796
+ raise errors.Error403(response_data, http_res)
2797
+ if utils.match_response(http_res, "404", "application/json"):
2798
+ response_data = unmarshal_json_response(errors.Error404Data, http_res)
2799
+ raise errors.Error404(response_data, http_res)
2800
+ if utils.match_response(http_res, "405", "application/json"):
2801
+ response_data = unmarshal_json_response(errors.Error405Data, http_res)
2802
+ raise errors.Error405(response_data, http_res)
2803
+ if utils.match_response(http_res, "409", "application/json"):
2804
+ response_data = unmarshal_json_response(errors.Error409Data, http_res)
2805
+ raise errors.Error409(response_data, http_res)
2806
+ if utils.match_response(http_res, "422", "application/json"):
2807
+ response_data = unmarshal_json_response(
2808
+ errors.HTTPValidationErrorData, http_res
2809
+ )
2810
+ raise errors.HTTPValidationError(response_data, http_res)
2811
+ if utils.match_response(http_res, "425", "application/json"):
2812
+ response_data = unmarshal_json_response(errors.Error425Data, http_res)
2813
+ raise errors.Error425(response_data, http_res)
2814
+ if utils.match_response(http_res, "429", "application/json"):
2815
+ response_data = unmarshal_json_response(errors.Error429Data, http_res)
2816
+ raise errors.Error429(response_data, http_res)
2817
+ if utils.match_response(http_res, "500", "application/json"):
2818
+ response_data = unmarshal_json_response(errors.Error500Data, http_res)
2819
+ raise errors.Error500(response_data, http_res)
2820
+ if utils.match_response(http_res, "502", "application/json"):
2821
+ response_data = unmarshal_json_response(errors.Error502Data, http_res)
2822
+ raise errors.Error502(response_data, http_res)
2823
+ if utils.match_response(http_res, "504", "application/json"):
2824
+ response_data = unmarshal_json_response(errors.Error504Data, http_res)
2825
+ raise errors.Error504(response_data, http_res)
2826
+ if utils.match_response(http_res, "4XX", "*"):
2827
+ http_res_text = await utils.stream_to_text_async(http_res)
2828
+ raise errors.APIError("API error occurred", http_res, http_res_text)
2829
+ if utils.match_response(http_res, "5XX", "*"):
2830
+ http_res_text = await utils.stream_to_text_async(http_res)
2831
+ raise errors.APIError("API error occurred", http_res, http_res_text)
2832
+
2833
+ raise errors.APIError("Unexpected response received", http_res)
2834
+
2543
2835
  def sync(
2544
2836
  self,
2545
2837
  *,
@@ -14,13 +14,15 @@ from typing import Any, Mapping, Optional
14
14
  class TransactionsRefunds(BaseSDK):
15
15
  all: All
16
16
 
17
- def __init__(self, sdk_config: SDKConfiguration) -> None:
18
- BaseSDK.__init__(self, sdk_config)
17
+ def __init__(
18
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
19
+ ) -> None:
20
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
19
21
  self.sdk_configuration = sdk_config
20
22
  self._init_sdks()
21
23
 
22
24
  def _init_sdks(self):
23
- self.all = All(self.sdk_configuration)
25
+ self.all = All(self.sdk_configuration, parent_ref=self.parent_ref)
24
26
 
25
27
  def list(
26
28
  self,
gr4vy/utils/__init__.py CHANGED
@@ -3,6 +3,7 @@
3
3
  from typing import TYPE_CHECKING
4
4
  from importlib import import_module
5
5
  import builtins
6
+ import sys
6
7
 
7
8
  if TYPE_CHECKING:
8
9
  from .annotations import get_discriminator
@@ -162,6 +163,18 @@ _dynamic_imports: dict[str, str] = {
162
163
  }
163
164
 
164
165
 
166
+ def dynamic_import(modname, retries=3):
167
+ for attempt in range(retries):
168
+ try:
169
+ return import_module(modname, __package__)
170
+ except KeyError:
171
+ # Clear any half-initialized module and retry
172
+ sys.modules.pop(modname, None)
173
+ if attempt == retries - 1:
174
+ break
175
+ raise KeyError(f"Failed to import module '{modname}' after {retries} attempts")
176
+
177
+
165
178
  def __getattr__(attr_name: str) -> object:
166
179
  module_name = _dynamic_imports.get(attr_name)
167
180
  if module_name is None:
@@ -170,9 +183,8 @@ def __getattr__(attr_name: str) -> object:
170
183
  )
171
184
 
172
185
  try:
173
- module = import_module(module_name, __package__)
174
- result = getattr(module, attr_name)
175
- return result
186
+ module = dynamic_import(module_name)
187
+ return getattr(module, attr_name)
176
188
  except ImportError as e:
177
189
  raise ImportError(
178
190
  f"Failed to import {attr_name} from {module_name}: {e}"
@@ -17,6 +17,9 @@ T = TypeVar("T")
17
17
 
18
18
 
19
19
  class EventStream(Generic[T]):
20
+ # Holds a reference to the SDK client to avoid it being garbage collected
21
+ # and cause termination of the underlying httpx client.
22
+ client_ref: Optional[object]
20
23
  response: httpx.Response
21
24
  generator: Generator[T, None, None]
22
25
 
@@ -25,9 +28,11 @@ class EventStream(Generic[T]):
25
28
  response: httpx.Response,
26
29
  decoder: Callable[[str], T],
27
30
  sentinel: Optional[str] = None,
31
+ client_ref: Optional[object] = None,
28
32
  ):
29
33
  self.response = response
30
34
  self.generator = stream_events(response, decoder, sentinel)
35
+ self.client_ref = client_ref
31
36
 
32
37
  def __iter__(self):
33
38
  return self
@@ -43,6 +48,9 @@ class EventStream(Generic[T]):
43
48
 
44
49
 
45
50
  class EventStreamAsync(Generic[T]):
51
+ # Holds a reference to the SDK client to avoid it being garbage collected
52
+ # and cause termination of the underlying httpx client.
53
+ client_ref: Optional[object]
46
54
  response: httpx.Response
47
55
  generator: AsyncGenerator[T, None]
48
56
 
@@ -51,9 +59,11 @@ class EventStreamAsync(Generic[T]):
51
59
  response: httpx.Response,
52
60
  decoder: Callable[[str], T],
53
61
  sentinel: Optional[str] = None,
62
+ client_ref: Optional[object] = None,
54
63
  ):
55
64
  self.response = response
56
65
  self.generator = stream_events_async(response, decoder, sentinel)
66
+ self.client_ref = client_ref
57
67
 
58
68
  def __aiter__(self):
59
69
  return self
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gr4vy
3
- Version: 1.1.35
3
+ Version: 1.2.1
4
4
  Summary: Python Client SDK Generated by Speakeasy.
5
5
  Author: Gr4vy
6
6
  Requires-Python: >=3.9.2
@@ -490,6 +490,7 @@ except ValueError as error:
490
490
  * [update](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/transactions/README.md#update) - Manually update a transaction
491
491
  * [capture](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/transactions/README.md#capture) - Capture transaction
492
492
  * [void](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/transactions/README.md#void) - Void transaction
493
+ * [cancel](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/transactions/README.md#cancel) - Cancel transaction
493
494
  * [sync](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/transactions/README.md#sync) - Sync transaction
494
495
 
495
496
  #### [transactions.events](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/events/README.md)
@@ -2,22 +2,22 @@ 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=WKDTdkinT_kPr01aPBvb6Kz-f7ScsaVq7kqlsV_2kBc,454
6
- gr4vy/account_updater.py,sha256=AIu37O0v3fkWjbcbZJf1MI32lpVnIWynRmd1ys_cSnk,477
5
+ gr4vy/_version.py,sha256=0Q5aJfrq4vdvm26lVeB8tBL7QnhfGozo5pDdx6FvyDw,454
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=iAT3rnS0NYNKZGw5IVl_MC_RPAHMJNXHfd_K--HIplU,17015
9
9
  gr4vy/auth.py,sha256=gxS5MjLUA0r1mSZADniCIQV4khqAn7FMvrTh-9Czm1g,8714
10
10
  gr4vy/balances.py,sha256=I5ImXo3bgkaCVigCTnUf1SQK-0LxZEHOex4Dx6MuGRk,14396
11
- gr4vy/basesdk.py,sha256=O7Ku2SBCoyWhpyg5iphN27Q4ZBeaxJ7K_QlZJp3z3O8,11878
11
+ gr4vy/basesdk.py,sha256=blX6OgKfbCxGZ93GxJuXZaAOmfdIoi-yLHe8Zo5Wg1o,12173
12
12
  gr4vy/buyers_gift_cards.py,sha256=TRQD2w-J82928Q8htFgnJ-Ulr7_1K4EsGayL-9NO84U,14114
13
13
  gr4vy/buyers_payment_methods.py,sha256=lhYTmPxRo0b5_wvotz9NtfAJjfqd8fJ9pOvDdHv7PlY,15591
14
- gr4vy/buyers_sdk.py,sha256=QKQjFogdd4Ap1JzgL0Oe0ELk2wRnd6mTVP-87HsmMwY,73302
14
+ gr4vy/buyers_sdk.py,sha256=zjlEF3mRmR-2sPQHarM-93hlEdxq7me2nzoXNHRw5hM,73526
15
15
  gr4vy/buyers_shipping_details.py,sha256=BPnFwoJNXU8F6ChOctILxHfQY8vJvK218Am6nUnhckA,73399
16
16
  gr4vy/card_scheme_definitions_sdk.py,sha256=qwoymeumRGbAi1G3rGPh-BRqsCaXEB-IQcTN0MNaekc,13639
17
17
  gr4vy/checkout_sessions.py,sha256=njjoKuvOUSH09Rhw0vfrwbvBTPUYzLcoP-DE-NOZn34,57130
18
- gr4vy/digital_wallets_sdk.py,sha256=la8MXd9aincPlnRqtk6l2gC44ZIn1pNafCtds8johEY,71103
18
+ gr4vy/digital_wallets_sdk.py,sha256=W4QNFKk3N4xtoiUPpEcrVJGN62aZnuHrPQIpppw3ZN0,71233
19
19
  gr4vy/domains.py,sha256=fzBmPm5fA9rwO8smhC2ob7TrnkT1o1rnyc9Y9x6j_uA,28586
20
- gr4vy/errors/__init__.py,sha256=gLycD1zf2eyP1AKzefuPeYIY-svYq3t5KBnNpOkeHZs,3319
20
+ gr4vy/errors/__init__.py,sha256=ZDz7v86-UM-FLysIfPwSWRu-TH_1Xfu8xo8SCpVeFY8,3697
21
21
  gr4vy/errors/apierror.py,sha256=9ejCsDbUjHPHMM3Ml_LIVOfMQMyTYp6csY8PdqkMxps,1215
22
22
  gr4vy/errors/error400.py,sha256=I09HbmsGnS2eN4SjDYn_2dmW-a2NDbAatuu62Q1fqoM,1425
23
23
  gr4vy/errors/error401.py,sha256=yMSFG4sAFHYB-tpmgBnwXySzSqhA5Qeg5BXlHEAruX4,1447
@@ -36,11 +36,11 @@ gr4vy/errors/no_response_error.py,sha256=FQG44Lq6uF7uUlzbUYfM3dJon6sbqXzJ0Ri6YrD
36
36
  gr4vy/errors/responsevalidationerror.py,sha256=pGG3nQxVp1R4aUNpFcfZt9eFkTmghX_mpaXk7PzOYUU,682
37
37
  gr4vy/events.py,sha256=BIMBWIzunyVMD86pj2zzWaUd_o5WY1MQZN77uxHe7es,14735
38
38
  gr4vy/executions.py,sha256=e9OaF4qVIo-7ggjDUad3OH_V1PANev6avArdMRu9K8o,43060
39
- gr4vy/gift_cards_sdk.py,sha256=hgGnEm1_4pvLndCFebzr5QmqqbzkTb2vfyNVl2HpRnU,57363
39
+ gr4vy/gift_cards_sdk.py,sha256=wGmWTaQqsnVOUNXQ7dFZcDAcw9c5wq8xyoO189ctmpo,57465
40
40
  gr4vy/httpclient.py,sha256=Eu73urOAiZQtdUIyOUnPccxCiBbWEKrXG-JrRG3SLM4,3946
41
41
  gr4vy/jobs.py,sha256=WHx0epnlxOMHFSXTJPwuI5dhOO_acGTX72Lbz6fvD8A,14565
42
42
  gr4vy/merchant_accounts_sdk.py,sha256=TGwGZqyD_b7xR2pggTsOa3H813-zhakhtjS9d_NsfmA,80907
43
- gr4vy/models/__init__.py,sha256=MQvi2DDxYVD_L2t5oWTyqvRcllFZAFNVC3ta-ysi0Qc,130020
43
+ gr4vy/models/__init__.py,sha256=JbrNyHNBK8OlW3Kfhcbk5auLFgXnT4RAKD8FBxc0bDI,131370
44
44
  gr4vy/models/accountsreceivablesreportspec.py,sha256=X4YKJ5TII4KFi1I47BYt1Egxsfs84EaqXsb7g90IpLw,1012
45
45
  gr4vy/models/accountupdaterinquirysummary.py,sha256=rOJn5uG7cNFUkd6BbsAve6ueUlAJzU5_d_zeDu6RBTg,1097
46
46
  gr4vy/models/accountupdaterjob.py,sha256=JKuRwrc5yYSAQ9lD5Ta4MALtfXBF7tn_37lllQsH2B0,1972
@@ -81,6 +81,8 @@ gr4vy/models/buyer.py,sha256=KEN4eeI7HSPr8NcrR8ieEhwCeqZpALWHwCebfRSeL7U,3569
81
81
  gr4vy/models/buyercreate.py,sha256=bFhAzie6osvQYc8YSlCwwZuEIaTmgmddVpD607fbHNQ,2555
82
82
  gr4vy/models/buyers.py,sha256=QJLFFT-l3RUGww78h-BqYTt7Mr-fLUs9VDrK2wl3naU,2133
83
83
  gr4vy/models/buyerupdate.py,sha256=tiPp2oKZYemrRp0uCt0sO6x-nlKNmtvIIzTmRCBe_h4,2567
84
+ gr4vy/models/cancel_transactionop.py,sha256=RBsqNruvMIWAHkhPT_s4GPu3pWlf_NfKJWNXc9HrvxI,1511
85
+ gr4vy/models/cancelstatus.py,sha256=sEpL0C7fS95WiqRX4WRGXkfYXu3jZ3TQoVPYeqfBcVE,265
84
86
  gr4vy/models/capture_transactionop.py,sha256=-mWQC7dDILr0PKYgC6mOTcD2vYRtumbd92IAbbf67MM,3726
85
87
  gr4vy/models/capturestatus.py,sha256=dqgBYyfzjQRML7XsbbeW2BkJLdkOZDb1VjOufU_9by4,284
86
88
  gr4vy/models/cardpaymentmethodcreate.py,sha256=WQPt3NYDIPV0lCDQ8rB4Tqzu9JNkh0_UrgwJZeCI6SQ,3498
@@ -206,7 +208,7 @@ gr4vy/models/googlepaysessionrequest.py,sha256=Z5kTOUSN707Xz9urjaqfhRwW1oRRbnlzv
206
208
  gr4vy/models/guestbuyer_input.py,sha256=PhJnN3DMRqd6Lc-_JPLjHVHn0lxT_cez86OdLGLwDTQ,2877
207
209
  gr4vy/models/guestbuyer_output.py,sha256=fDSHUtYbZsVoI0Od3Lzxzp6wA-4TrKwHHGGt8aMuTQo,2884
208
210
  gr4vy/models/instrumenttype.py,sha256=cPt9UC0QeqeC2EXKJJD0x8t27OS6lQsnRZ22IGUdf_g,400
209
- gr4vy/models/internal/__init__.py,sha256=XazI7p8v0DliYkdFe2SYyNC_z--QI32SihJPjnMqEWo,1154
211
+ gr4vy/models/internal/__init__.py,sha256=xowceJVTVAP3WRyQ0NEGkm9PAoYU1l0_VYgXZP0ZvlM,1569
210
212
  gr4vy/models/internal/globals.py,sha256=LOin0ZxkLmWMhPRtR0I9rutYwe8KvZ4c-yJyfv9A8Qw,755
211
213
  gr4vy/models/latitudeoptions.py,sha256=dswG3n30p01I1F7R49WvUvu6WSCdQUw0E47ipuWgKds,1546
212
214
  gr4vy/models/list_all_report_executionsop.py,sha256=ndtvXxp1Lv78pdH7kyE_3nVs0OjWRoS0T4Nrj_SKkuU,6624
@@ -340,11 +342,12 @@ gr4vy/models/threedsecurev2.py,sha256=tbl7LU6hrQaC-stDPQYXJApr62A2HgJD17YvD06Isn
340
342
  gr4vy/models/tokenpaymentmethodcreate.py,sha256=vuhZCgZvu9d7U7DAjBN6Bx8tJ29Yx-LCxrmijXaWUj0,2681
341
343
  gr4vy/models/transaction.py,sha256=fof5VDhoQfUyp23cR0QX2RHtSskU--Bj1sqO0Yxyd5U,22264
342
344
  gr4vy/models/transactionbuyer.py,sha256=7VxBYmR7IBNA082NqCCdwWtOjyK9ut5dPS4M-6rVHjE,3074
345
+ gr4vy/models/transactioncancel.py,sha256=OHP0xmmM374aaYXPeV0G2fZn5RRfxbTAzJnNospfCas,3162
343
346
  gr4vy/models/transactioncapture.py,sha256=7WD3uoUyDJ1sejtjIb7b5B5BFtpKEi7KkegVtB0DLTg,3174
344
347
  gr4vy/models/transactioncapturecreate.py,sha256=Hs8tTi8iG3xUBptznKHfUD7rvcGZX0OwDzpXOBegd8E,2188
345
348
  gr4vy/models/transactionconnectionoptions.py,sha256=GeXBb1VgGyRJvOxt8Dl0-psTHERjFWM5GBBgcvuBGKI,18231
346
349
  gr4vy/models/transactioncreate.py,sha256=eMZkJnfkuv50JzEeI3MzlHKs01PSuYLfxoRu4VV1dgE,24223
347
- gr4vy/models/transactionevent.py,sha256=voDvaH47WMfkjeISC8RkR2bD1ralzC7ArNuz4DceSqY,3806
350
+ gr4vy/models/transactionevent.py,sha256=rZm6VX53piqFWSMMP1rLsRqV2rw6_5J7BHrUt4Nfh2M,3871
348
351
  gr4vy/models/transactionevents.py,sha256=5l2Yc69SMePDlFtcby4i3BxGBkbT62SWQf4X5Xvfypw,2210
349
352
  gr4vy/models/transactiongiftcard.py,sha256=E4f_76ezJJdPlW9kIbrXt-PIx2Zgg3bhqPjVzhWdjpM,2329
350
353
  gr4vy/models/transactionintent.py,sha256=D_Mfcssx4vzhs2dX_rRdeUWMSb1i6fXmorA_z_g_Aos,260
@@ -388,9 +391,9 @@ gr4vy/models/wpaypaytoresourceoptions.py,sha256=Ub4XCfIiXKjGXkDERkXmyBWEaFBRxoiB
388
391
  gr4vy/models/wpaypaytosimulationoptions.py,sha256=_UHWxMSXhhEOjXwf4hOdelhtZNOFoqk7OoaqSjGofmY,1876
389
392
  gr4vy/network_tokens_cryptogram.py,sha256=HBv4aCe9FxTmOzV6gONFU9peYVjD3Ww3B9xh93ooU9E,14950
390
393
  gr4vy/payment_links_sdk.py,sha256=ezTPTc54698TVlwuS5fZABxx7o0tnpKrE1FFSyMz9DU,64481
391
- gr4vy/payment_methods_network_tokens.py,sha256=K8PiqFVMOigjXwtPUQ-9X3yiok9XjMRTSwUivxUChkE,70141
394
+ gr4vy/payment_methods_network_tokens.py,sha256=MZ92irp_W7i-u7c88SXudOiTCyUv5-oDgW4PUcoZiTk,70265
392
395
  gr4vy/payment_methods_payment_service_tokens.py,sha256=NO2Fip0_Aa3CQfvgBC9_5oZNrk4Z8F1N0AtcMWU4kjg,43209
393
- gr4vy/payment_methods_sdk.py,sha256=tqpfdj3UOXhV0mENTUOjNosYXKVT6ZFARCdhPJQqTGg,57880
396
+ gr4vy/payment_methods_sdk.py,sha256=B2eaabKEfZoiGoEkjqFk88gb0B2QJ_LyaLNZxb7ZfrY,58032
394
397
  gr4vy/payment_options_sdk.py,sha256=i8_MNRvP2_0I0WK0fH_hcuORYbEWOTpNnvvvdHnLBi8,17079
395
398
  gr4vy/payment_service_definitions_sdk.py,sha256=FeopZyGstUfbG30vvgzAzxGN5UFxM4oQ6XWXPXAiOPY,41246
396
399
  gr4vy/payment_services_sdk.py,sha256=crnzsrsC6q8A43wf6kapeSH-SkpLOgLjFs71CC2sZg4,113732
@@ -398,20 +401,20 @@ gr4vy/payouts.py,sha256=XdxuCEknh7-feW4r_W4NKoZb4zO54YM7_ducYrrpzj4,47677
398
401
  gr4vy/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
399
402
  gr4vy/refunds_sdk.py,sha256=kpU3NaVMsgKxhWblTF-jfAl_Cdpw1HqARP81TypFsjs,13551
400
403
  gr4vy/report_executions_sdk.py,sha256=He-YQa3iTStnx2xAx8jfpnj8qX4vO4_cVHgvuVCWqos,18877
401
- gr4vy/reports_sdk.py,sha256=TFAORPDv-jvsfStTk-lS07dTJ-ym4RKlmzi4YzeOcEk,59455
402
- gr4vy/sdk.py,sha256=MfaztXtoC-ioVEfV80BxbywQRG0dkfX47L4heekeyoY,9966
404
+ gr4vy/reports_sdk.py,sha256=lUuxAgnAO0CIDYEoP3VAHnYoG8d4Vq-pi-41uJ4sKPs,59557
405
+ gr4vy/sdk.py,sha256=XqkSODRWO2VLYcVBhQjX0EdgKson0juO_oQMsgJ_h5o,10477
403
406
  gr4vy/sdkconfiguration.py,sha256=aBQ8gY9aOjf1TL0kSLat8hEIoH4lCE9_PhihyhBpRE4,1985
404
407
  gr4vy/sessions.py,sha256=yg9L1vMfHT6dNc6zjthULHFS2dC67QzXCv5WUFMn3DI,41609
405
- gr4vy/transactions.py,sha256=nWi-T4cxdahtSb1riH5FJry_AM5RwbixGDoqCTTUeWs,151221
406
- gr4vy/transactions_refunds.py,sha256=UjmLxnLtUB7_DjYdkGVcW8_JVa7w1BF5R7m_uGCA1sU,43489
408
+ gr4vy/transactions.py,sha256=706j8-jmi-fSoNhIsMENmtvw5VqawPPyJopb-YFvJyc,164741
409
+ gr4vy/transactions_refunds.py,sha256=_YXYEbNw-F5PotIxZE83zU__987Asqz_9JnqBIKhEvw,43591
407
410
  gr4vy/transactions_settlements.py,sha256=YOH0JAGvli36XhKKXyQ81JIIuv59uCOpqBri6SlYfa0,27750
408
411
  gr4vy/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
409
412
  gr4vy/types/basemodel.py,sha256=L79WXvTECbSqaJzs8D3ud_KdIWkU7Cx2wbohDAktE9E,1127
410
- gr4vy/utils/__init__.py,sha256=f0z1dsfJtiN5V5w4AE1dZb6W0_hDyMzVaDVq18RCbiQ,5470
413
+ gr4vy/utils/__init__.py,sha256=CAG0O76aEToGKXpT6Ft87Vd-iiQTh4XdBrQ37BVbsiM,5861
411
414
  gr4vy/utils/annotations.py,sha256=aR7mZG34FzgRdew7WZPYEu9QGBerpuKxCF4sek5Z_5Y,1699
412
415
  gr4vy/utils/datetimes.py,sha256=oppAA5e3V35pQov1-FNLKxAaNF1_XWi-bQtyjjql3H8,855
413
416
  gr4vy/utils/enums.py,sha256=REU6ydF8gsVL3xaeGX4sMNyiL3q5P9h29-f6Sa6luAE,2633
414
- gr4vy/utils/eventstreaming.py,sha256=LtcrfJYw4nP2Oe4Wl0-cEURLzRGYReRGWNFY5wYECIE,6186
417
+ gr4vy/utils/eventstreaming.py,sha256=SgFqMcUOYKlrTQ4gAp_dNcKLvDXukeiEMNU3DP8mXk8,6692
415
418
  gr4vy/utils/forms.py,sha256=EJdnrfIkuwpDtekyHutla0HjI_FypTYcmYNyPKEu_W0,6874
416
419
  gr4vy/utils/headers.py,sha256=cPxWSmUILrefTGDzTH1Hdj7_Hlsj-EY6K5Tyc4iH4dk,3663
417
420
  gr4vy/utils/logger.py,sha256=WdT856mADqljmNjIW_Y1ntFJrIWz3CCOowhK8kcGobk,669
@@ -425,6 +428,6 @@ gr4vy/utils/unmarshal_json_response.py,sha256=H7jxugtMDuagdBXdpGiPf0Vr5-PWLETp8B
425
428
  gr4vy/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
426
429
  gr4vy/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
427
430
  gr4vy/webhooks.py,sha256=2L-ZhdK-XU2X0AkVqgZvhfRqDCKUVs7R4UNCmZJR78w,1359
428
- gr4vy-1.1.35.dist-info/METADATA,sha256=c46YR-iskCSErVTt6A-1-1HEhmKmMkPiNKdmL8SHKOk,44029
429
- gr4vy-1.1.35.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
430
- gr4vy-1.1.35.dist-info/RECORD,,
431
+ gr4vy-1.2.1.dist-info/METADATA,sha256=rvmcxWyYQqU6E5aJY1vccqymw5G-66VikOo49Pl6TYA,44151
432
+ gr4vy-1.2.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
433
+ gr4vy-1.2.1.dist-info/RECORD,,
File without changes