gr4vy 1.7.16__py3-none-any.whl → 1.8.0__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.
Files changed (47) hide show
  1. gr4vy/_version.py +3 -3
  2. gr4vy/buyers_sdk.py +8 -8
  3. gr4vy/checkout_sessions.py +4 -4
  4. gr4vy/models/__init__.py +92 -113
  5. gr4vy/models/auditlogentries.py +3 -3
  6. gr4vy/models/{auditlogentry_output.py → auditlogentry.py} +2 -2
  7. gr4vy/models/{billingdetails_input.py → billingdetails.py} +2 -2
  8. gr4vy/models/buyer.py +3 -3
  9. gr4vy/models/buyercreate.py +3 -3
  10. gr4vy/models/buyerupdate.py +3 -3
  11. gr4vy/models/capture_transactionop.py +23 -10
  12. gr4vy/models/checkoutsession.py +8 -8
  13. gr4vy/models/checkoutsessioncreate.py +3 -3
  14. gr4vy/models/{checkoutsessionpaymentmethod_output.py → checkoutsessionpaymentmethod.py} +2 -2
  15. gr4vy/models/cybersourceoptions.py +7 -0
  16. gr4vy/models/{guestbuyer_input.py → guestbuyer.py} +5 -5
  17. gr4vy/models/paymentlink.py +3 -6
  18. gr4vy/models/paymentlinkcreate.py +3 -3
  19. gr4vy/models/paymentmethodsummaries.py +3 -6
  20. gr4vy/models/{paymentmethodsummary_output.py → paymentmethodsummary.py} +2 -2
  21. gr4vy/models/{paymentoption_output.py → paymentoption.py} +2 -2
  22. gr4vy/models/paymentoptions.py +3 -3
  23. gr4vy/models/payoutcreate.py +3 -3
  24. gr4vy/models/payoutsummary.py +8 -11
  25. gr4vy/models/{transaction_output.py → transaction.py} +15 -18
  26. gr4vy/models/{transactionbuyer_output.py → transactionbuyer.py} +5 -5
  27. gr4vy/models/transactioncancel.py +3 -3
  28. gr4vy/models/{transactioncapture_output.py → transactioncapture.py} +5 -5
  29. gr4vy/models/transactioncreate.py +3 -3
  30. gr4vy/models/{transactionevent_output.py → transactionevent.py} +9 -5
  31. gr4vy/models/transactioneventcontext.py +32 -0
  32. gr4vy/models/transactionevents.py +3 -6
  33. gr4vy/models/{transactionpaymentmethod_output.py → transactionpaymentmethod.py} +2 -2
  34. gr4vy/models/transactionsummaries.py +3 -6
  35. gr4vy/models/{transactionsummary_output.py → transactionsummary.py} +10 -13
  36. gr4vy/models/{transactionthreedsecuresummary_output.py → transactionthreedsecuresummary.py} +2 -2
  37. gr4vy/models/{transactionvoid_output.py → transactionvoid.py} +5 -5
  38. gr4vy/models/void_transactionop.py +28 -11
  39. gr4vy/payment_links_sdk.py +4 -4
  40. gr4vy/payouts.py +4 -4
  41. gr4vy/transactions.py +20 -20
  42. gr4vy/utils/retries.py +69 -5
  43. {gr4vy-1.7.16.dist-info → gr4vy-1.8.0.dist-info}/METADATA +1 -1
  44. {gr4vy-1.7.16.dist-info → gr4vy-1.8.0.dist-info}/RECORD +45 -46
  45. gr4vy/models/billingdetails_output.py +0 -87
  46. gr4vy/models/guestbuyer_output.py +0 -80
  47. {gr4vy-1.7.16.dist-info → gr4vy-1.8.0.dist-info}/WHEEL +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from .capturestatus import CaptureStatus
5
- from .transaction_output import TransactionOutput, TransactionOutputTypedDict
5
+ from .transaction import Transaction, TransactionTypedDict
6
6
  from gr4vy.types import BaseModel, Nullable, UNSET_SENTINEL
7
7
  from gr4vy.utils import validate_const, validate_open_enum
8
8
  import pydantic
@@ -12,7 +12,7 @@ from typing import Literal, Optional
12
12
  from typing_extensions import Annotated, TypedDict
13
13
 
14
14
 
15
- class TransactionCaptureOutputTypedDict(TypedDict):
15
+ class TransactionCaptureTypedDict(TypedDict):
16
16
  status: CaptureStatus
17
17
  code: Nullable[str]
18
18
  r"""The standardized error code set by Gr4vy."""
@@ -20,13 +20,13 @@ class TransactionCaptureOutputTypedDict(TypedDict):
20
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
21
  raw_response_description: Nullable[str]
22
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: TransactionOutputTypedDict
23
+ transaction: TransactionTypedDict
24
24
  r"""A full transaction resource."""
25
25
  type: Literal["transaction-capture"]
26
26
  r"""Always `transaction-capture`."""
27
27
 
28
28
 
29
- class TransactionCaptureOutput(BaseModel):
29
+ class TransactionCapture(BaseModel):
30
30
  status: Annotated[CaptureStatus, PlainValidator(validate_open_enum(False))]
31
31
 
32
32
  code: Nullable[str]
@@ -38,7 +38,7 @@ class TransactionCaptureOutput(BaseModel):
38
38
  raw_response_description: Nullable[str]
39
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
40
 
41
- transaction: TransactionOutput
41
+ transaction: Transaction
42
42
  r"""A full transaction resource."""
43
43
 
44
44
  TYPE: Annotated[
@@ -40,7 +40,7 @@ from .googlepaypaymentmethodcreate import (
40
40
  GooglePayPaymentMethodCreate,
41
41
  GooglePayPaymentMethodCreateTypedDict,
42
42
  )
43
- from .guestbuyer_input import GuestBuyerInput, GuestBuyerInputTypedDict
43
+ from .guestbuyer import GuestBuyer, GuestBuyerTypedDict
44
44
  from .integrationclient import IntegrationClient
45
45
  from .networktokenpaymentmethodcreate import (
46
46
  NetworkTokenPaymentMethodCreate,
@@ -147,7 +147,7 @@ class TransactionCreateTypedDict(TypedDict):
147
147
  r"""The 2-letter ISO code of the country where the transaction is processed. This is also used to filter the payment services that can process the transaction. If this value is provided for redirect requests and it's not `null`, it must match the one specified for `country` in `payment_method`. Otherwise, the value specified for `country` in `payment_method` will be assumed implicitly."""
148
148
  payment_method: NotRequired[Nullable[TransactionCreatePaymentMethodTypedDict]]
149
149
  r"""The optional payment method to use for this transaction. This field is required if no `gift_cards` have been added."""
150
- buyer: NotRequired[Nullable[GuestBuyerInputTypedDict]]
150
+ buyer: NotRequired[Nullable[GuestBuyerTypedDict]]
151
151
  r"""Guest buyer details provided inline rather than creating a buyer resource beforehand and using the `buyer_id` or `buyer_external_identifier` keys. No buyer resource will be created on Gr4vy when used."""
152
152
  buyer_id: NotRequired[Nullable[str]]
153
153
  r"""The ID of the buyer to associate this payment method to. If this field is provided then the `buyer_external_identifier` field needs to be unset. If a stored payment method or gift card is provided, then the buyer for that payment method needs to match the buyer for this field."""
@@ -252,7 +252,7 @@ class TransactionCreate(BaseModel):
252
252
  payment_method: OptionalNullable[TransactionCreatePaymentMethod] = UNSET
253
253
  r"""The optional payment method to use for this transaction. This field is required if no `gift_cards` have been added."""
254
254
 
255
- buyer: OptionalNullable[GuestBuyerInput] = UNSET
255
+ buyer: OptionalNullable[GuestBuyer] = UNSET
256
256
  r"""Guest buyer details provided inline rather than creating a buyer resource beforehand and using the `buyer_id` or `buyer_external_identifier` keys. No buyer resource will be created on Gr4vy when used."""
257
257
 
258
258
  buyer_id: OptionalNullable[str] = UNSET
@@ -1,12 +1,16 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
+ from .transactioneventcontext import (
5
+ TransactionEventContext,
6
+ TransactionEventContextTypedDict,
7
+ )
4
8
  from datetime import datetime
5
9
  from gr4vy.types import BaseModel, UnrecognizedStr
6
10
  from gr4vy.utils import validate_const, validate_open_enum
7
11
  import pydantic
8
12
  from pydantic.functional_validators import AfterValidator, PlainValidator
9
- from typing import Any, Dict, Literal, Optional, Union
13
+ from typing import Literal, Optional, Union
10
14
  from typing_extensions import Annotated, TypedDict
11
15
 
12
16
 
@@ -69,19 +73,19 @@ Name = Union[
69
73
  r"""The specific event name."""
70
74
 
71
75
 
72
- class TransactionEventOutputTypedDict(TypedDict):
76
+ class TransactionEventTypedDict(TypedDict):
73
77
  id: str
74
78
  r"""The ID for the event."""
75
79
  name: Name
76
80
  r"""The specific event name."""
77
81
  created_at: datetime
78
82
  r"""The date this event was created at."""
79
- context: Dict[str, Any]
83
+ context: TransactionEventContextTypedDict
80
84
  type: Literal["transaction-event"]
81
85
  r"""Always `transaction-event`."""
82
86
 
83
87
 
84
- class TransactionEventOutput(BaseModel):
88
+ class TransactionEvent(BaseModel):
85
89
  id: str
86
90
  r"""The ID for the event."""
87
91
 
@@ -91,7 +95,7 @@ class TransactionEventOutput(BaseModel):
91
95
  created_at: datetime
92
96
  r"""The date this event was created at."""
93
97
 
94
- context: Dict[str, Any]
98
+ context: TransactionEventContext
95
99
 
96
100
  TYPE: Annotated[
97
101
  Annotated[
@@ -0,0 +1,32 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from gr4vy.types import BaseModel
5
+ import pydantic
6
+ from pydantic import ConfigDict
7
+ from typing import Any, Dict
8
+ from typing_extensions import TypedDict
9
+
10
+
11
+ class TransactionEventContextTypedDict(TypedDict):
12
+ transaction_id: Any
13
+ created_at: Any
14
+
15
+
16
+ class TransactionEventContext(BaseModel):
17
+ model_config = ConfigDict(
18
+ populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
19
+ )
20
+ __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
21
+
22
+ transaction_id: Any
23
+
24
+ created_at: Any
25
+
26
+ @property
27
+ def additional_properties(self):
28
+ return self.__pydantic_extra__
29
+
30
+ @additional_properties.setter
31
+ def additional_properties(self, value):
32
+ self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
@@ -1,10 +1,7 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from .transactionevent_output import (
5
- TransactionEventOutput,
6
- TransactionEventOutputTypedDict,
7
- )
4
+ from .transactionevent import TransactionEvent, TransactionEventTypedDict
8
5
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
9
6
  from pydantic import model_serializer
10
7
  from typing import List, Optional
@@ -12,7 +9,7 @@ from typing_extensions import NotRequired, TypedDict
12
9
 
13
10
 
14
11
  class TransactionEventsTypedDict(TypedDict):
15
- items: List[TransactionEventOutputTypedDict]
12
+ items: List[TransactionEventTypedDict]
16
13
  r"""A list of items returned for this request."""
17
14
  limit: NotRequired[int]
18
15
  r"""The number of items for this page."""
@@ -23,7 +20,7 @@ class TransactionEventsTypedDict(TypedDict):
23
20
 
24
21
 
25
22
  class TransactionEvents(BaseModel):
26
- items: List[TransactionEventOutput]
23
+ items: List[TransactionEvent]
27
24
  r"""A list of items returned for this request."""
28
25
 
29
26
  limit: Optional[int] = 20
@@ -19,7 +19,7 @@ from typing import Literal, Optional
19
19
  from typing_extensions import Annotated, NotRequired, TypedDict
20
20
 
21
21
 
22
- class TransactionPaymentMethodOutputTypedDict(TypedDict):
22
+ class TransactionPaymentMethodTypedDict(TypedDict):
23
23
  method: Method
24
24
  type: Literal["payment-method"]
25
25
  r"""Always `payment-method`."""
@@ -53,7 +53,7 @@ class TransactionPaymentMethodOutputTypedDict(TypedDict):
53
53
  r"""The payment account reference (PAR) returned by the card scheme. This is a unique reference to the underlying account that has been used to fund this payment method."""
54
54
 
55
55
 
56
- class TransactionPaymentMethodOutput(BaseModel):
56
+ class TransactionPaymentMethod(BaseModel):
57
57
  method: Annotated[Method, PlainValidator(validate_open_enum(False))]
58
58
 
59
59
  TYPE: Annotated[
@@ -1,10 +1,7 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from .transactionsummary_output import (
5
- TransactionSummaryOutput,
6
- TransactionSummaryOutputTypedDict,
7
- )
4
+ from .transactionsummary import TransactionSummary, TransactionSummaryTypedDict
8
5
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
9
6
  from pydantic import model_serializer
10
7
  from typing import List, Optional
@@ -12,7 +9,7 @@ from typing_extensions import NotRequired, TypedDict
12
9
 
13
10
 
14
11
  class TransactionSummariesTypedDict(TypedDict):
15
- items: List[TransactionSummaryOutputTypedDict]
12
+ items: List[TransactionSummaryTypedDict]
16
13
  r"""A list of items returned for this request."""
17
14
  limit: NotRequired[int]
18
15
  r"""The number of items for this page."""
@@ -23,7 +20,7 @@ class TransactionSummariesTypedDict(TypedDict):
23
20
 
24
21
 
25
22
  class TransactionSummaries(BaseModel):
26
- items: List[TransactionSummaryOutput]
23
+ items: List[TransactionSummary]
27
24
  r"""A list of items returned for this request."""
28
25
 
29
26
  limit: Optional[int] = 20
@@ -6,14 +6,11 @@ from .giftcardservice import GiftCardService, GiftCardServiceTypedDict
6
6
  from .instrumenttype import InstrumentType
7
7
  from .method import Method
8
8
  from .shippingdetails import ShippingDetails, ShippingDetailsTypedDict
9
- from .transactionbuyer_output import (
10
- TransactionBuyerOutput,
11
- TransactionBuyerOutputTypedDict,
12
- )
9
+ from .transactionbuyer import TransactionBuyer, TransactionBuyerTypedDict
13
10
  from .transactionintent import TransactionIntent
14
- from .transactionpaymentmethod_output import (
15
- TransactionPaymentMethodOutput,
16
- TransactionPaymentMethodOutputTypedDict,
11
+ from .transactionpaymentmethod import (
12
+ TransactionPaymentMethod,
13
+ TransactionPaymentMethodTypedDict,
17
14
  )
18
15
  from .transactionpaymentservice import (
19
16
  TransactionPaymentService,
@@ -30,7 +27,7 @@ from typing import List, Literal, Optional
30
27
  from typing_extensions import Annotated, NotRequired, TypedDict
31
28
 
32
29
 
33
- class TransactionSummaryOutputTypedDict(TypedDict):
30
+ class TransactionSummaryTypedDict(TypedDict):
34
31
  r"""A transaction, summarised"""
35
32
 
36
33
  id: str
@@ -71,7 +68,7 @@ class TransactionSummaryOutputTypedDict(TypedDict):
71
68
  r"""The 2-letter ISO 3166-1 alpha-2 country code for the transaction. Used to filter payment services for processing."""
72
69
  external_identifier: NotRequired[Nullable[str]]
73
70
  r"""An external identifier that can be used to match the transaction against your own records."""
74
- payment_method: NotRequired[Nullable[TransactionPaymentMethodOutputTypedDict]]
71
+ payment_method: NotRequired[Nullable[TransactionPaymentMethodTypedDict]]
75
72
  r"""The payment method used for this transaction."""
76
73
  method: NotRequired[Nullable[Method]]
77
74
  r"""The method used for the transaction."""
@@ -83,7 +80,7 @@ class TransactionSummaryOutputTypedDict(TypedDict):
83
80
  r"""The payment service used for this transaction."""
84
81
  pending_review: NotRequired[bool]
85
82
  r"""Whether a manual anti fraud review is pending with an anti fraud service."""
86
- buyer: NotRequired[Nullable[TransactionBuyerOutputTypedDict]]
83
+ buyer: NotRequired[Nullable[TransactionBuyerTypedDict]]
87
84
  r"""The buyer used for this transaction."""
88
85
  raw_response_code: NotRequired[Nullable[str]]
89
86
  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."""
@@ -97,7 +94,7 @@ class TransactionSummaryOutputTypedDict(TypedDict):
97
94
  r"""The gift card service used for this transaction."""
98
95
 
99
96
 
100
- class TransactionSummaryOutput(BaseModel):
97
+ class TransactionSummary(BaseModel):
101
98
  r"""A transaction, summarised"""
102
99
 
103
100
  id: str
@@ -164,7 +161,7 @@ class TransactionSummaryOutput(BaseModel):
164
161
  external_identifier: OptionalNullable[str] = UNSET
165
162
  r"""An external identifier that can be used to match the transaction against your own records."""
166
163
 
167
- payment_method: OptionalNullable[TransactionPaymentMethodOutput] = UNSET
164
+ payment_method: OptionalNullable[TransactionPaymentMethod] = UNSET
168
165
  r"""The payment method used for this transaction."""
169
166
 
170
167
  method: Annotated[
@@ -186,7 +183,7 @@ class TransactionSummaryOutput(BaseModel):
186
183
  pending_review: Optional[bool] = False
187
184
  r"""Whether a manual anti fraud review is pending with an anti fraud service."""
188
185
 
189
- buyer: OptionalNullable[TransactionBuyerOutput] = UNSET
186
+ buyer: OptionalNullable[TransactionBuyer] = UNSET
190
187
  r"""The buyer used for this transaction."""
191
188
 
192
189
  raw_response_code: OptionalNullable[str] = UNSET
@@ -24,7 +24,7 @@ ResponseData = TypeAliasType("ResponseData", Union[ThreeDSecureDataV1, ThreeDSec
24
24
  r"""The 3DS data sent to the payment service for this transaction. This will only be populated if external 3DS data was passed in directly as part of the transaction API call, or if our 3DS server returned a status code of `Y` or `A`. In case of a failure to authenticate (status `N`, `R`, or `U`) this field will not be populated. To see full details about the 3DS calls please use our transaction events API."""
25
25
 
26
26
 
27
- class TransactionThreeDSecureSummaryOutputTypedDict(TypedDict):
27
+ class TransactionThreeDSecureSummaryTypedDict(TypedDict):
28
28
  version: NotRequired[Nullable[str]]
29
29
  r"""The version of 3DS used for this transaction."""
30
30
  status: NotRequired[Nullable[ThreeDSecureStatus]]
@@ -37,7 +37,7 @@ class TransactionThreeDSecureSummaryOutputTypedDict(TypedDict):
37
37
  r"""The error data received from our 3DS server. This will not be populated if the customer failed the authentication with a status code of `N`, `R`, or `U`. To see full details about the 3DS calls in those situations please use our transaction events API."""
38
38
 
39
39
 
40
- class TransactionThreeDSecureSummaryOutput(BaseModel):
40
+ class TransactionThreeDSecureSummary(BaseModel):
41
41
  version: OptionalNullable[str] = UNSET
42
42
  r"""The version of 3DS used for this transaction."""
43
43
 
@@ -1,7 +1,7 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from .transaction_output import TransactionOutput, TransactionOutputTypedDict
4
+ from .transaction import Transaction, TransactionTypedDict
5
5
  from .voidstatus import VoidStatus
6
6
  from gr4vy.types import BaseModel, Nullable, UNSET_SENTINEL
7
7
  from gr4vy.utils import validate_const, validate_open_enum
@@ -12,7 +12,7 @@ from typing import Literal, Optional
12
12
  from typing_extensions import Annotated, TypedDict
13
13
 
14
14
 
15
- class TransactionVoidOutputTypedDict(TypedDict):
15
+ class TransactionVoidTypedDict(TypedDict):
16
16
  status: VoidStatus
17
17
  code: Nullable[str]
18
18
  r"""The standardized error code set by Gr4vy."""
@@ -20,13 +20,13 @@ class TransactionVoidOutputTypedDict(TypedDict):
20
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
21
  raw_response_description: Nullable[str]
22
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: TransactionOutputTypedDict
23
+ transaction: TransactionTypedDict
24
24
  r"""A full transaction resource."""
25
25
  type: Literal["transaction-void"]
26
26
  r"""Always `transaction-void`."""
27
27
 
28
28
 
29
- class TransactionVoidOutput(BaseModel):
29
+ class TransactionVoid(BaseModel):
30
30
  status: Annotated[VoidStatus, PlainValidator(validate_open_enum(False))]
31
31
 
32
32
  code: Nullable[str]
@@ -38,7 +38,7 @@ class TransactionVoidOutput(BaseModel):
38
38
  raw_response_description: Nullable[str]
39
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
40
 
41
- transaction: TransactionOutput
41
+ transaction: Transaction
42
42
  r"""A full transaction resource."""
43
43
 
44
44
  TYPE: Annotated[
@@ -1,15 +1,17 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from .transaction_output import TransactionOutput, TransactionOutputTypedDict
5
- from .transactionvoid_output import (
6
- TransactionVoidOutput,
7
- TransactionVoidOutputTypedDict,
8
- )
4
+ from .transaction import Transaction, TransactionTypedDict
5
+ from .transactionvoid import TransactionVoid, TransactionVoidTypedDict
9
6
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
10
- from gr4vy.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
7
+ from gr4vy.utils import (
8
+ FieldMetadata,
9
+ HeaderMetadata,
10
+ PathParamMetadata,
11
+ get_discriminator,
12
+ )
11
13
  import pydantic
12
- from pydantic import model_serializer
14
+ from pydantic import Discriminator, Tag, model_serializer
13
15
  from typing import List, Optional, Union
14
16
  from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
15
17
 
@@ -89,12 +91,27 @@ class VoidTransactionRequest(BaseModel):
89
91
 
90
92
  ResponseVoidTransactionTypedDict = TypeAliasType(
91
93
  "ResponseVoidTransactionTypedDict",
92
- Union[TransactionVoidOutputTypedDict, TransactionOutputTypedDict],
94
+ Union[TransactionVoidTypedDict, TransactionTypedDict],
93
95
  )
94
96
  r"""Successful Response"""
95
97
 
96
98
 
97
- ResponseVoidTransaction = TypeAliasType(
98
- "ResponseVoidTransaction", Union[TransactionVoidOutput, TransactionOutput]
99
- )
99
+ ResponseVoidTransaction = Annotated[
100
+ Union[
101
+ Annotated[Transaction, Tag("processing")],
102
+ Annotated[Transaction, Tag("authorization_succeeded")],
103
+ Annotated[Transaction, Tag("authorization_declined")],
104
+ Annotated[Transaction, Tag("authorization_failed")],
105
+ Annotated[Transaction, Tag("authorization_voided")],
106
+ Annotated[Transaction, Tag("authorization_void_pending")],
107
+ Annotated[Transaction, Tag("capture_succeeded")],
108
+ Annotated[Transaction, Tag("capture_pending")],
109
+ Annotated[Transaction, Tag("buyer_approval_pending")],
110
+ Annotated[TransactionVoid, Tag("succeeded")],
111
+ Annotated[TransactionVoid, Tag("pending")],
112
+ Annotated[TransactionVoid, Tag("declined")],
113
+ Annotated[TransactionVoid, Tag("failed")],
114
+ ],
115
+ Discriminator(lambda m: get_discriminator(m, "status", "status")),
116
+ ]
100
117
  r"""Successful Response"""
@@ -20,7 +20,7 @@ class PaymentLinksSDK(BaseSDK):
20
20
  currency: str,
21
21
  merchant_account_id: Optional[str] = None,
22
22
  buyer: OptionalNullable[
23
- Union[models.GuestBuyerInput, models.GuestBuyerInputTypedDict]
23
+ Union[models.GuestBuyer, models.GuestBuyerTypedDict]
24
24
  ] = UNSET,
25
25
  expires_at: OptionalNullable[datetime] = UNSET,
26
26
  connection_options: OptionalNullable[
@@ -98,7 +98,7 @@ class PaymentLinksSDK(BaseSDK):
98
98
  merchant_account_id=merchant_account_id,
99
99
  payment_link_create=models.PaymentLinkCreate(
100
100
  buyer=utils.get_pydantic_model(
101
- buyer, OptionalNullable[models.GuestBuyerInput]
101
+ buyer, OptionalNullable[models.GuestBuyer]
102
102
  ),
103
103
  expires_at=expires_at,
104
104
  connection_options=utils.get_pydantic_model(
@@ -252,7 +252,7 @@ class PaymentLinksSDK(BaseSDK):
252
252
  currency: str,
253
253
  merchant_account_id: Optional[str] = None,
254
254
  buyer: OptionalNullable[
255
- Union[models.GuestBuyerInput, models.GuestBuyerInputTypedDict]
255
+ Union[models.GuestBuyer, models.GuestBuyerTypedDict]
256
256
  ] = UNSET,
257
257
  expires_at: OptionalNullable[datetime] = UNSET,
258
258
  connection_options: OptionalNullable[
@@ -330,7 +330,7 @@ class PaymentLinksSDK(BaseSDK):
330
330
  merchant_account_id=merchant_account_id,
331
331
  payment_link_create=models.PaymentLinkCreate(
332
332
  buyer=utils.get_pydantic_model(
333
- buyer, OptionalNullable[models.GuestBuyerInput]
333
+ buyer, OptionalNullable[models.GuestBuyer]
334
334
  ),
335
335
  expires_at=expires_at,
336
336
  connection_options=utils.get_pydantic_model(
gr4vy/payouts.py CHANGED
@@ -367,7 +367,7 @@ class Payouts(BaseSDK):
367
367
  external_identifier: OptionalNullable[str] = UNSET,
368
368
  buyer_id: OptionalNullable[str] = UNSET,
369
369
  buyer: OptionalNullable[
370
- Union[models.GuestBuyerInput, models.GuestBuyerInputTypedDict]
370
+ Union[models.GuestBuyer, models.GuestBuyerTypedDict]
371
371
  ] = UNSET,
372
372
  buyer_external_identifier: OptionalNullable[str] = UNSET,
373
373
  merchant: OptionalNullable[
@@ -427,7 +427,7 @@ class Payouts(BaseSDK):
427
427
  external_identifier=external_identifier,
428
428
  buyer_id=buyer_id,
429
429
  buyer=utils.get_pydantic_model(
430
- buyer, OptionalNullable[models.GuestBuyerInput]
430
+ buyer, OptionalNullable[models.GuestBuyer]
431
431
  ),
432
432
  buyer_external_identifier=buyer_external_identifier,
433
433
  merchant=utils.get_pydantic_model(
@@ -563,7 +563,7 @@ class Payouts(BaseSDK):
563
563
  external_identifier: OptionalNullable[str] = UNSET,
564
564
  buyer_id: OptionalNullable[str] = UNSET,
565
565
  buyer: OptionalNullable[
566
- Union[models.GuestBuyerInput, models.GuestBuyerInputTypedDict]
566
+ Union[models.GuestBuyer, models.GuestBuyerTypedDict]
567
567
  ] = UNSET,
568
568
  buyer_external_identifier: OptionalNullable[str] = UNSET,
569
569
  merchant: OptionalNullable[
@@ -623,7 +623,7 @@ class Payouts(BaseSDK):
623
623
  external_identifier=external_identifier,
624
624
  buyer_id=buyer_id,
625
625
  buyer=utils.get_pydantic_model(
626
- buyer, OptionalNullable[models.GuestBuyerInput]
626
+ buyer, OptionalNullable[models.GuestBuyer]
627
627
  ),
628
628
  buyer_external_identifier=buyer_external_identifier,
629
629
  merchant=utils.get_pydantic_model(