gr4vy 1.10.8__py3-none-any.whl → 1.10.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gr4vy/_version.py +3 -3
- gr4vy/models/adyencardoptions.py +1 -6
- gr4vy/models/adyensepaoptions.py +1 -6
- gr4vy/models/airline.py +2 -7
- gr4vy/models/airlineleg.py +2 -6
- gr4vy/models/airlinepassenger.py +2 -6
- gr4vy/models/auditlogentry.py +3 -3
- gr4vy/models/auditlogentryuser.py +3 -3
- gr4vy/models/braintreedynamicdatafieldsoptions.py +2 -7
- gr4vy/models/browserinfo.py +2 -4
- gr4vy/models/capture_transactionop.py +4 -20
- gr4vy/models/cartitem.py +2 -6
- gr4vy/models/checkoutsessionpaymentmethod.py +3 -5
- gr4vy/models/checkoutsessionpaymentmethoddetails.py +2 -6
- gr4vy/models/createsession.py +3 -3
- gr4vy/models/definitionfield.py +1 -6
- gr4vy/models/digitalwallet.py +3 -5
- gr4vy/models/digitalwalletcreate.py +2 -6
- gr4vy/models/dlocalupirecurringinfooptions.py +2 -6
- gr4vy/models/errordetail.py +2 -4
- gr4vy/models/forterantifraudoptions.py +2 -7
- gr4vy/models/forterantifraudoptionscartitembasicitemdata.py +2 -7
- gr4vy/models/forterantifraudoptionscartitemdeliverydetails.py +3 -6
- gr4vy/models/giftcardredemption.py +4 -8
- gr4vy/models/giftcardservice.py +3 -5
- gr4vy/models/giftcardsummary.py +3 -5
- gr4vy/models/list_all_report_executionsop.py +2 -14
- gr4vy/models/list_audit_logsop.py +2 -10
- gr4vy/models/list_buyer_payment_methodsop.py +2 -3
- gr4vy/models/list_payment_methodsop.py +2 -14
- gr4vy/models/list_payment_servicesop.py +2 -8
- gr4vy/models/list_reportsop.py +2 -10
- gr4vy/models/list_transactionsop.py +4 -22
- gr4vy/models/merchantaccount.py +3 -5
- gr4vy/models/merchantaccountcreate.py +2 -6
- gr4vy/models/merchantaccountupdate.py +2 -6
- gr4vy/models/networktoken.py +3 -3
- gr4vy/models/networktokenpaymentmethodcreate.py +4 -8
- gr4vy/models/paymentlink.py +12 -7
- gr4vy/models/paymentlinkcreate.py +10 -9
- gr4vy/models/paymentmethod.py +7 -13
- gr4vy/models/paymentmethodcard.py +3 -5
- gr4vy/models/paymentmethoddetailscard.py +2 -6
- gr4vy/models/paymentmethodsummary.py +6 -12
- gr4vy/models/paymentoption.py +3 -3
- gr4vy/models/paymentservice.py +4 -6
- gr4vy/models/paymentserviceconfiguration.py +2 -6
- gr4vy/models/paymentservicedefinition.py +5 -7
- gr4vy/models/paymentservicetoken.py +3 -3
- gr4vy/models/payoutcreate.py +2 -6
- gr4vy/models/payoutsummary.py +4 -6
- gr4vy/models/paypalshippingoptionsitem.py +2 -7
- gr4vy/models/redirectpaymentmethodcreate.py +2 -6
- gr4vy/models/refund.py +4 -4
- gr4vy/models/report.py +4 -6
- gr4vy/models/reportcreate.py +2 -3
- gr4vy/models/reportexecution.py +3 -3
- gr4vy/models/reportexecutionsummary.py +3 -3
- gr4vy/models/reportspec.py +2 -4
- gr4vy/models/reportsummary.py +3 -5
- gr4vy/models/taxid.py +2 -4
- gr4vy/models/threedsecuredatav1.py +2 -6
- gr4vy/models/threedsecuredatav2.py +2 -6
- gr4vy/models/transaction.py +11 -25
- gr4vy/models/transactionaction.py +4 -4
- gr4vy/models/transactioncancel.py +3 -3
- gr4vy/models/transactioncapture.py +3 -3
- gr4vy/models/transactioncreate.py +4 -12
- gr4vy/models/transactionevent.py +4 -3
- gr4vy/models/transactionpaymentmethod.py +6 -12
- gr4vy/models/transactionpaymentservice.py +3 -3
- gr4vy/models/transactionrefundcreate.py +2 -6
- gr4vy/models/transactionsummary.py +6 -10
- gr4vy/models/transactionthreedsecuresummary.py +3 -9
- gr4vy/models/transactionvoid.py +3 -3
- gr4vy/models/void_transactionop.py +5 -25
- gr4vy/payment_links_sdk.py +6 -0
- gr4vy/utils/__init__.py +0 -3
- gr4vy/utils/enums.py +60 -0
- gr4vy/utils/requestbodies.py +3 -3
- gr4vy/utils/serializers.py +0 -20
- {gr4vy-1.10.8.dist-info → gr4vy-1.10.10.dist-info}/METADATA +1 -1
- {gr4vy-1.10.8.dist-info → gr4vy-1.10.10.dist-info}/RECORD +84 -84
- {gr4vy-1.10.8.dist-info → gr4vy-1.10.10.dist-info}/WHEEL +0 -0
gr4vy/models/paymentservice.py
CHANGED
|
@@ -10,10 +10,10 @@ from .method import Method
|
|
|
10
10
|
from .paymentservicestatus import PaymentServiceStatus
|
|
11
11
|
from datetime import datetime
|
|
12
12
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
13
|
-
from gr4vy.utils import validate_const
|
|
13
|
+
from gr4vy.utils import validate_const
|
|
14
14
|
import pydantic
|
|
15
15
|
from pydantic import model_serializer
|
|
16
|
-
from pydantic.functional_validators import AfterValidator
|
|
16
|
+
from pydantic.functional_validators import AfterValidator
|
|
17
17
|
from typing import Dict, List, Literal, Optional
|
|
18
18
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
19
19
|
|
|
@@ -73,7 +73,7 @@ class PaymentService(BaseModel):
|
|
|
73
73
|
payment_service_definition_id: str
|
|
74
74
|
r"""The definition ID of the service that has been configured."""
|
|
75
75
|
|
|
76
|
-
method:
|
|
76
|
+
method: Method
|
|
77
77
|
|
|
78
78
|
display_name: str
|
|
79
79
|
r"""The display name for the payment service."""
|
|
@@ -119,9 +119,7 @@ class PaymentService(BaseModel):
|
|
|
119
119
|
active: Optional[bool] = True
|
|
120
120
|
r"""Defines if this payment service is currently active."""
|
|
121
121
|
|
|
122
|
-
status:
|
|
123
|
-
Optional[PaymentServiceStatus], PlainValidator(validate_open_enum(False))
|
|
124
|
-
] = None
|
|
122
|
+
status: Optional[PaymentServiceStatus] = None
|
|
125
123
|
|
|
126
124
|
three_d_secure_enabled: OptionalNullable[bool] = UNSET
|
|
127
125
|
r"""Defines if this payment service has 3DS enabled."""
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .approvaltarget import ApprovalTarget
|
|
5
5
|
from gr4vy.types import BaseModel
|
|
6
|
-
from
|
|
7
|
-
from pydantic.functional_validators import PlainValidator
|
|
8
|
-
from typing_extensions import Annotated, TypedDict
|
|
6
|
+
from typing_extensions import TypedDict
|
|
9
7
|
|
|
10
8
|
|
|
11
9
|
class PaymentServiceConfigurationTypedDict(TypedDict):
|
|
@@ -23,9 +21,7 @@ class PaymentServiceConfigurationTypedDict(TypedDict):
|
|
|
23
21
|
|
|
24
22
|
|
|
25
23
|
class PaymentServiceConfiguration(BaseModel):
|
|
26
|
-
approval_ui_target:
|
|
27
|
-
ApprovalTarget, PlainValidator(validate_open_enum(False))
|
|
28
|
-
]
|
|
24
|
+
approval_ui_target: ApprovalTarget
|
|
29
25
|
|
|
30
26
|
approval_ui_height: str
|
|
31
27
|
r"""Height of the approval interface in either pixels or view height (vh)."""
|
|
@@ -14,10 +14,10 @@ from .requiredcheckoutfields import (
|
|
|
14
14
|
RequiredCheckoutFieldsTypedDict,
|
|
15
15
|
)
|
|
16
16
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
17
|
-
from gr4vy.utils import validate_const
|
|
17
|
+
from gr4vy.utils import validate_const
|
|
18
18
|
import pydantic
|
|
19
19
|
from pydantic import model_serializer
|
|
20
|
-
from pydantic.functional_validators import AfterValidator
|
|
20
|
+
from pydantic.functional_validators import AfterValidator
|
|
21
21
|
from typing import Dict, List, Literal, Optional
|
|
22
22
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
23
23
|
|
|
@@ -57,7 +57,7 @@ class PaymentServiceDefinition(BaseModel):
|
|
|
57
57
|
display_name: str
|
|
58
58
|
r"""A human friendly name for this service."""
|
|
59
59
|
|
|
60
|
-
method:
|
|
60
|
+
method: Method
|
|
61
61
|
|
|
62
62
|
fields: List[DefinitionField]
|
|
63
63
|
r"""A list of credentials and related fields which can be configured for this service."""
|
|
@@ -71,7 +71,7 @@ class PaymentServiceDefinition(BaseModel):
|
|
|
71
71
|
supported_countries: List[str]
|
|
72
72
|
r"""A list of two-letter ISO country codes that this service supports."""
|
|
73
73
|
|
|
74
|
-
mode:
|
|
74
|
+
mode: Mode
|
|
75
75
|
|
|
76
76
|
supported_features: Dict[str, bool]
|
|
77
77
|
r"""Features supported by the payment service."""
|
|
@@ -81,9 +81,7 @@ class PaymentServiceDefinition(BaseModel):
|
|
|
81
81
|
|
|
82
82
|
configuration: PaymentServiceConfiguration
|
|
83
83
|
|
|
84
|
-
supported_integration_clients: Nullable[
|
|
85
|
-
List[Annotated[IntegrationClient, PlainValidator(validate_open_enum(False))]]
|
|
86
|
-
]
|
|
84
|
+
supported_integration_clients: Nullable[List[IntegrationClient]]
|
|
87
85
|
r"""List of supported integration clients. Defaults to redirect for most redirect connectors."""
|
|
88
86
|
|
|
89
87
|
TYPE: Annotated[
|
|
@@ -4,10 +4,10 @@ from __future__ import annotations
|
|
|
4
4
|
from .paymentmethodstatus import PaymentMethodStatus
|
|
5
5
|
from datetime import datetime
|
|
6
6
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
7
|
-
from gr4vy.utils import validate_const
|
|
7
|
+
from gr4vy.utils import validate_const
|
|
8
8
|
import pydantic
|
|
9
9
|
from pydantic import model_serializer
|
|
10
|
-
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from pydantic.functional_validators import AfterValidator
|
|
11
11
|
from typing import Literal, Optional
|
|
12
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
13
13
|
|
|
@@ -42,7 +42,7 @@ class PaymentServiceToken(BaseModel):
|
|
|
42
42
|
payment_service_id: str
|
|
43
43
|
r"""The ID of the payment method used to generate this token."""
|
|
44
44
|
|
|
45
|
-
status:
|
|
45
|
+
status: PaymentMethodStatus
|
|
46
46
|
|
|
47
47
|
created_at: datetime
|
|
48
48
|
r"""The date and time when this payment service token was first created in our system."""
|
gr4vy/models/payoutcreate.py
CHANGED
|
@@ -14,11 +14,9 @@ from .payoutconnectionoptions import (
|
|
|
14
14
|
)
|
|
15
15
|
from .payoutmerchant import PayoutMerchant, PayoutMerchantTypedDict
|
|
16
16
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
17
|
-
from gr4vy.utils import validate_open_enum
|
|
18
17
|
from pydantic import model_serializer
|
|
19
|
-
from pydantic.functional_validators import PlainValidator
|
|
20
18
|
from typing import Union
|
|
21
|
-
from typing_extensions import
|
|
19
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
22
20
|
|
|
23
21
|
|
|
24
22
|
PayoutCreatePaymentMethodTypedDict = TypeAliasType(
|
|
@@ -82,9 +80,7 @@ class PayoutCreate(BaseModel):
|
|
|
82
80
|
payment_method: PayoutCreatePaymentMethod
|
|
83
81
|
r"""The type of payment method to send funds too."""
|
|
84
82
|
|
|
85
|
-
category:
|
|
86
|
-
OptionalNullable[PayoutCategory], PlainValidator(validate_open_enum(False))
|
|
87
|
-
] = UNSET
|
|
83
|
+
category: OptionalNullable[PayoutCategory] = UNSET
|
|
88
84
|
r"""The type of payout to process."""
|
|
89
85
|
|
|
90
86
|
external_identifier: OptionalNullable[str] = UNSET
|
gr4vy/models/payoutsummary.py
CHANGED
|
@@ -12,10 +12,10 @@ from .transactionpaymentmethod import (
|
|
|
12
12
|
)
|
|
13
13
|
from datetime import datetime
|
|
14
14
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
15
|
-
from gr4vy.utils import validate_const
|
|
15
|
+
from gr4vy.utils import validate_const
|
|
16
16
|
import pydantic
|
|
17
17
|
from pydantic import model_serializer
|
|
18
|
-
from pydantic.functional_validators import AfterValidator
|
|
18
|
+
from pydantic.functional_validators import AfterValidator
|
|
19
19
|
from typing import Literal, Optional
|
|
20
20
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
21
21
|
|
|
@@ -74,7 +74,7 @@ class PayoutSummary(BaseModel):
|
|
|
74
74
|
|
|
75
75
|
payment_service: PayoutPaymentService
|
|
76
76
|
|
|
77
|
-
status:
|
|
77
|
+
status: PayoutStatus
|
|
78
78
|
|
|
79
79
|
updated_at: datetime
|
|
80
80
|
r"""The date this payout was last updated at."""
|
|
@@ -93,9 +93,7 @@ class PayoutSummary(BaseModel):
|
|
|
93
93
|
buyer: OptionalNullable[TransactionBuyer] = UNSET
|
|
94
94
|
r"""The buyer used for this payout."""
|
|
95
95
|
|
|
96
|
-
category:
|
|
97
|
-
OptionalNullable[PayoutCategory], PlainValidator(validate_open_enum(False))
|
|
98
|
-
] = UNSET
|
|
96
|
+
category: OptionalNullable[PayoutCategory] = UNSET
|
|
99
97
|
r"""The type of payout to process."""
|
|
100
98
|
|
|
101
99
|
external_identifier: OptionalNullable[str] = UNSET
|
|
@@ -13,11 +13,9 @@ from gr4vy.types import (
|
|
|
13
13
|
UNSET_SENTINEL,
|
|
14
14
|
UnrecognizedStr,
|
|
15
15
|
)
|
|
16
|
-
from gr4vy.utils import validate_open_enum
|
|
17
16
|
from pydantic import model_serializer
|
|
18
|
-
from pydantic.functional_validators import PlainValidator
|
|
19
17
|
from typing import Literal, Union
|
|
20
|
-
from typing_extensions import
|
|
18
|
+
from typing_extensions import NotRequired, TypedDict
|
|
21
19
|
|
|
22
20
|
|
|
23
21
|
PaypalShippingOptionsItemType = Union[
|
|
@@ -54,10 +52,7 @@ class PaypalShippingOptionsItem(BaseModel):
|
|
|
54
52
|
selected: bool
|
|
55
53
|
r"""If the API request sets selected = true, it represents the shipping option that the payee or merchant expects to be pre-selected for the payer when they first view the shipping.options in the PayPal Checkout experience. Only one shipping.option can be set to selected=true."""
|
|
56
54
|
|
|
57
|
-
type:
|
|
58
|
-
OptionalNullable[PaypalShippingOptionsItemType],
|
|
59
|
-
PlainValidator(validate_open_enum(False)),
|
|
60
|
-
] = UNSET
|
|
55
|
+
type: OptionalNullable[PaypalShippingOptionsItemType] = UNSET
|
|
61
56
|
r"""A classification for the method of purchase fulfillment."""
|
|
62
57
|
|
|
63
58
|
amount: OptionalNullable[PaypalShippingOptionsItemAmount] = UNSET
|
|
@@ -9,11 +9,9 @@ from gr4vy.types import (
|
|
|
9
9
|
UNSET_SENTINEL,
|
|
10
10
|
UnrecognizedStr,
|
|
11
11
|
)
|
|
12
|
-
from gr4vy.utils import validate_open_enum
|
|
13
12
|
from pydantic import model_serializer
|
|
14
|
-
from pydantic.functional_validators import PlainValidator
|
|
15
13
|
from typing import Literal, Union
|
|
16
|
-
from typing_extensions import
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict
|
|
17
15
|
|
|
18
16
|
|
|
19
17
|
RedirectPaymentMethodCreateMethod = Union[
|
|
@@ -144,9 +142,7 @@ class RedirectPaymentMethodCreateTypedDict(TypedDict):
|
|
|
144
142
|
class RedirectPaymentMethodCreate(BaseModel):
|
|
145
143
|
r"""Create a transaction for an APM/LPM that requires a redirect."""
|
|
146
144
|
|
|
147
|
-
method:
|
|
148
|
-
RedirectPaymentMethodCreateMethod, PlainValidator(validate_open_enum(False))
|
|
149
|
-
]
|
|
145
|
+
method: RedirectPaymentMethodCreateMethod
|
|
150
146
|
r"""The method to use, this can be any of the methods that support redirect requests."""
|
|
151
147
|
|
|
152
148
|
country: str
|
gr4vy/models/refund.py
CHANGED
|
@@ -6,10 +6,10 @@ from .refundstatus import RefundStatus
|
|
|
6
6
|
from .refundtargettype import RefundTargetType
|
|
7
7
|
from datetime import datetime
|
|
8
8
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
9
|
-
from gr4vy.utils import validate_const
|
|
9
|
+
from gr4vy.utils import validate_const
|
|
10
10
|
import pydantic
|
|
11
11
|
from pydantic import model_serializer
|
|
12
|
-
from pydantic.functional_validators import AfterValidator
|
|
12
|
+
from pydantic.functional_validators import AfterValidator
|
|
13
13
|
from typing import Literal, Optional
|
|
14
14
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
15
15
|
|
|
@@ -62,7 +62,7 @@ class Refund(BaseModel):
|
|
|
62
62
|
transaction_id: str
|
|
63
63
|
r"""The ID of the transaction associated with this refund."""
|
|
64
64
|
|
|
65
|
-
status:
|
|
65
|
+
status: RefundStatus
|
|
66
66
|
|
|
67
67
|
currency: str
|
|
68
68
|
r"""The ISO 4217 currency code for this refund. Will always match that of the associated transaction."""
|
|
@@ -70,7 +70,7 @@ class Refund(BaseModel):
|
|
|
70
70
|
amount: int
|
|
71
71
|
r"""The amount of this refund, in the smallest currency unit (for example, cents or pence)."""
|
|
72
72
|
|
|
73
|
-
target_type:
|
|
73
|
+
target_type: RefundTargetType
|
|
74
74
|
|
|
75
75
|
reconciliation_id: str
|
|
76
76
|
r"""The base62 encoded refund ID. This represents a shorter version of this refund's `id` which is sent to payment services, anti-fraud services, and other connectors. You can use this ID to reconcile a payment service's refund against our system."""
|
gr4vy/models/report.py
CHANGED
|
@@ -10,10 +10,10 @@ from .reportschedule import ReportSchedule
|
|
|
10
10
|
from .reportspec import ReportSpec, ReportSpecTypedDict
|
|
11
11
|
from datetime import datetime
|
|
12
12
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
13
|
-
from gr4vy.utils import validate_const
|
|
13
|
+
from gr4vy.utils import validate_const
|
|
14
14
|
import pydantic
|
|
15
15
|
from pydantic import model_serializer
|
|
16
|
-
from pydantic.functional_validators import AfterValidator
|
|
16
|
+
from pydantic.functional_validators import AfterValidator
|
|
17
17
|
from typing import Literal, Optional
|
|
18
18
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
19
19
|
|
|
@@ -67,7 +67,7 @@ class Report(BaseModel):
|
|
|
67
67
|
updated_at: datetime
|
|
68
68
|
r"""The date this report was last updated."""
|
|
69
69
|
|
|
70
|
-
schedule:
|
|
70
|
+
schedule: ReportSchedule
|
|
71
71
|
|
|
72
72
|
schedule_enabled: bool
|
|
73
73
|
r"""Whether the report schedule is enabled."""
|
|
@@ -91,9 +91,7 @@ class Report(BaseModel):
|
|
|
91
91
|
creator_display_name: OptionalNullable[str] = UNSET
|
|
92
92
|
r"""The display name of the report creator."""
|
|
93
93
|
|
|
94
|
-
creator_type:
|
|
95
|
-
OptionalNullable[ReportCreatorType], PlainValidator(validate_open_enum(False))
|
|
96
|
-
] = UNSET
|
|
94
|
+
creator_type: OptionalNullable[ReportCreatorType] = UNSET
|
|
97
95
|
r"""The type of the report creator."""
|
|
98
96
|
|
|
99
97
|
next_execution_at: OptionalNullable[datetime] = UNSET
|
gr4vy/models/reportcreate.py
CHANGED
|
@@ -19,9 +19,8 @@ from .transactionsreportspec import (
|
|
|
19
19
|
TransactionsReportSpecTypedDict,
|
|
20
20
|
)
|
|
21
21
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
22
|
-
from gr4vy.utils import get_discriminator
|
|
22
|
+
from gr4vy.utils import get_discriminator
|
|
23
23
|
from pydantic import Discriminator, Tag, model_serializer
|
|
24
|
-
from pydantic.functional_validators import PlainValidator
|
|
25
24
|
from typing import Optional, Union
|
|
26
25
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
27
26
|
|
|
@@ -68,7 +67,7 @@ class ReportCreate(BaseModel):
|
|
|
68
67
|
name: str
|
|
69
68
|
r"""The name of the report."""
|
|
70
69
|
|
|
71
|
-
schedule:
|
|
70
|
+
schedule: ReportSchedule
|
|
72
71
|
|
|
73
72
|
schedule_enabled: bool
|
|
74
73
|
r"""Whether the report schedule is enabled."""
|
gr4vy/models/reportexecution.py
CHANGED
|
@@ -9,9 +9,9 @@ from .reportexecutionstatus import ReportExecutionStatus
|
|
|
9
9
|
from .reportsummary import ReportSummary, ReportSummaryTypedDict
|
|
10
10
|
from datetime import datetime
|
|
11
11
|
from gr4vy.types import BaseModel
|
|
12
|
-
from gr4vy.utils import validate_const
|
|
12
|
+
from gr4vy.utils import validate_const
|
|
13
13
|
import pydantic
|
|
14
|
-
from pydantic.functional_validators import AfterValidator
|
|
14
|
+
from pydantic.functional_validators import AfterValidator
|
|
15
15
|
from typing import Literal, Optional
|
|
16
16
|
from typing_extensions import Annotated, TypedDict
|
|
17
17
|
|
|
@@ -40,7 +40,7 @@ class ReportExecution(BaseModel):
|
|
|
40
40
|
updated_at: datetime
|
|
41
41
|
r"""The date this report execution was last updated."""
|
|
42
42
|
|
|
43
|
-
status:
|
|
43
|
+
status: ReportExecutionStatus
|
|
44
44
|
|
|
45
45
|
context: ReportExecutionContext
|
|
46
46
|
|
|
@@ -8,9 +8,9 @@ from .reportexecutioncontext import (
|
|
|
8
8
|
from .reportexecutionstatus import ReportExecutionStatus
|
|
9
9
|
from datetime import datetime
|
|
10
10
|
from gr4vy.types import BaseModel
|
|
11
|
-
from gr4vy.utils import validate_const
|
|
11
|
+
from gr4vy.utils import validate_const
|
|
12
12
|
import pydantic
|
|
13
|
-
from pydantic.functional_validators import AfterValidator
|
|
13
|
+
from pydantic.functional_validators import AfterValidator
|
|
14
14
|
from typing import Literal, Optional
|
|
15
15
|
from typing_extensions import Annotated, TypedDict
|
|
16
16
|
|
|
@@ -38,7 +38,7 @@ class ReportExecutionSummary(BaseModel):
|
|
|
38
38
|
updated_at: datetime
|
|
39
39
|
r"""The date this report execution was last updated."""
|
|
40
40
|
|
|
41
|
-
status:
|
|
41
|
+
status: ReportExecutionStatus
|
|
42
42
|
|
|
43
43
|
context: ReportExecutionContext
|
|
44
44
|
|
gr4vy/models/reportspec.py
CHANGED
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .reportspecmodel import ReportSpecModel
|
|
5
5
|
from gr4vy.types import BaseModel
|
|
6
|
-
from gr4vy.utils import validate_open_enum
|
|
7
|
-
from pydantic.functional_validators import PlainValidator
|
|
8
6
|
from typing import Any, Dict
|
|
9
|
-
from typing_extensions import
|
|
7
|
+
from typing_extensions import TypedDict
|
|
10
8
|
|
|
11
9
|
|
|
12
10
|
class ReportSpecTypedDict(TypedDict):
|
|
@@ -16,7 +14,7 @@ class ReportSpecTypedDict(TypedDict):
|
|
|
16
14
|
|
|
17
15
|
|
|
18
16
|
class ReportSpec(BaseModel):
|
|
19
|
-
model:
|
|
17
|
+
model: ReportSpecModel
|
|
20
18
|
|
|
21
19
|
params: Dict[str, Any]
|
|
22
20
|
r"""The parameters for the report model."""
|
gr4vy/models/reportsummary.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .reportcreatortype import ReportCreatorType
|
|
5
5
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
6
|
-
from gr4vy.utils import validate_const
|
|
6
|
+
from gr4vy.utils import validate_const
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic import model_serializer
|
|
9
|
-
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from pydantic.functional_validators import AfterValidator
|
|
10
10
|
from typing import Literal, Optional
|
|
11
11
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
12
12
|
|
|
@@ -52,9 +52,7 @@ class ReportSummary(BaseModel):
|
|
|
52
52
|
creator_display_name: OptionalNullable[str] = UNSET
|
|
53
53
|
r"""The display name of the report creator."""
|
|
54
54
|
|
|
55
|
-
creator_type:
|
|
56
|
-
OptionalNullable[ReportCreatorType], PlainValidator(validate_open_enum(False))
|
|
57
|
-
] = UNSET
|
|
55
|
+
creator_type: OptionalNullable[ReportCreatorType] = UNSET
|
|
58
56
|
r"""The type of the report creator."""
|
|
59
57
|
|
|
60
58
|
@model_serializer(mode="wrap")
|
gr4vy/models/taxid.py
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .taxidkind import TaxIDKind
|
|
5
5
|
from gr4vy.types import BaseModel
|
|
6
|
-
from
|
|
7
|
-
from pydantic.functional_validators import PlainValidator
|
|
8
|
-
from typing_extensions import Annotated, TypedDict
|
|
6
|
+
from typing_extensions import TypedDict
|
|
9
7
|
|
|
10
8
|
|
|
11
9
|
class TaxIDTypedDict(TypedDict):
|
|
@@ -18,4 +16,4 @@ class TaxID(BaseModel):
|
|
|
18
16
|
value: str
|
|
19
17
|
r"""The tax ID for the buyer."""
|
|
20
18
|
|
|
21
|
-
kind:
|
|
19
|
+
kind: TaxIDKind
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .cardscheme import CardScheme
|
|
5
5
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
6
|
-
from gr4vy.utils import validate_open_enum
|
|
7
6
|
from pydantic import model_serializer
|
|
8
|
-
from
|
|
9
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
7
|
+
from typing_extensions import NotRequired, TypedDict
|
|
10
8
|
|
|
11
9
|
|
|
12
10
|
class ThreeDSecureDataV1TypedDict(TypedDict):
|
|
@@ -50,9 +48,7 @@ class ThreeDSecureDataV1(BaseModel):
|
|
|
50
48
|
xid: str
|
|
51
49
|
r"""The transaction identifier."""
|
|
52
50
|
|
|
53
|
-
scheme:
|
|
54
|
-
OptionalNullable[CardScheme], PlainValidator(validate_open_enum(False))
|
|
55
|
-
] = UNSET
|
|
51
|
+
scheme: OptionalNullable[CardScheme] = UNSET
|
|
56
52
|
r"""The scheme/brand of the card that is used for 3-D Secure."""
|
|
57
53
|
|
|
58
54
|
@model_serializer(mode="wrap")
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .cardscheme import CardScheme
|
|
5
5
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
6
|
-
from gr4vy.utils import validate_open_enum
|
|
7
6
|
from pydantic import model_serializer
|
|
8
|
-
from
|
|
9
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
7
|
+
from typing_extensions import NotRequired, TypedDict
|
|
10
8
|
|
|
11
9
|
|
|
12
10
|
class ThreeDSecureDataV2TypedDict(TypedDict):
|
|
@@ -42,9 +40,7 @@ class ThreeDSecureDataV2(BaseModel):
|
|
|
42
40
|
directory_transaction_id: str
|
|
43
41
|
r"""The transaction identifier."""
|
|
44
42
|
|
|
45
|
-
scheme:
|
|
46
|
-
OptionalNullable[CardScheme], PlainValidator(validate_open_enum(False))
|
|
47
|
-
] = UNSET
|
|
43
|
+
scheme: OptionalNullable[CardScheme] = UNSET
|
|
48
44
|
r"""The scheme/brand of the card that is used for 3-D Secure."""
|
|
49
45
|
|
|
50
46
|
authentication_response: OptionalNullable[str] = UNSET
|
gr4vy/models/transaction.py
CHANGED
|
@@ -32,10 +32,10 @@ from .transactionthreedsecuresummary import (
|
|
|
32
32
|
)
|
|
33
33
|
from datetime import datetime
|
|
34
34
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
35
|
-
from gr4vy.utils import validate_const
|
|
35
|
+
from gr4vy.utils import validate_const
|
|
36
36
|
import pydantic
|
|
37
37
|
from pydantic import model_serializer
|
|
38
|
-
from pydantic.functional_validators import AfterValidator
|
|
38
|
+
from pydantic.functional_validators import AfterValidator
|
|
39
39
|
from typing import Dict, List, Literal, Optional
|
|
40
40
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
41
41
|
|
|
@@ -196,7 +196,7 @@ class Transaction(BaseModel):
|
|
|
196
196
|
amount: int
|
|
197
197
|
r"""The total amount for this transaction across all funding sources including gift cards."""
|
|
198
198
|
|
|
199
|
-
status:
|
|
199
|
+
status: TransactionStatus
|
|
200
200
|
|
|
201
201
|
authorized_amount: int
|
|
202
202
|
r"""The amount for this transaction that has been authorized for the `payment_method`. This can be less than the `amount` if gift cards were used."""
|
|
@@ -213,7 +213,7 @@ class Transaction(BaseModel):
|
|
|
213
213
|
settled: bool
|
|
214
214
|
r"""Indicates whether this transaction has been settled."""
|
|
215
215
|
|
|
216
|
-
intent:
|
|
216
|
+
intent: TransactionIntent
|
|
217
217
|
|
|
218
218
|
gift_card_redemptions: List[GiftCardRedemption]
|
|
219
219
|
r"""The gift cards redeemed for this transaction."""
|
|
@@ -227,9 +227,7 @@ class Transaction(BaseModel):
|
|
|
227
227
|
disputed: bool
|
|
228
228
|
r"""Indicates whether this transaction has been disputed."""
|
|
229
229
|
|
|
230
|
-
payment_source:
|
|
231
|
-
TransactionPaymentSource, PlainValidator(validate_open_enum(False))
|
|
232
|
-
]
|
|
230
|
+
payment_source: TransactionPaymentSource
|
|
233
231
|
r"""The way payment method information made it to this transaction."""
|
|
234
232
|
|
|
235
233
|
merchant_initiated: bool
|
|
@@ -238,9 +236,7 @@ class Transaction(BaseModel):
|
|
|
238
236
|
is_subsequent_payment: bool
|
|
239
237
|
r"""Indicates whether the transaction represents a subsequent payment or an initial one."""
|
|
240
238
|
|
|
241
|
-
intent_outcome:
|
|
242
|
-
TransactionIntentOutcome, PlainValidator(validate_open_enum(False))
|
|
243
|
-
]
|
|
239
|
+
intent_outcome: TransactionIntentOutcome
|
|
244
240
|
|
|
245
241
|
multi_tender: bool
|
|
246
242
|
r"""The outcome of the original intent of a transaction. This allows you to understand if the intent of the transaction (e.g. `capture` or `authorize`) has been achieved when dealing with multiple payment instruments."""
|
|
@@ -269,14 +265,10 @@ class Transaction(BaseModel):
|
|
|
269
265
|
payment_method: OptionalNullable[TransactionPaymentMethod] = UNSET
|
|
270
266
|
r"""The payment method used for this transaction."""
|
|
271
267
|
|
|
272
|
-
method:
|
|
273
|
-
OptionalNullable[Method], PlainValidator(validate_open_enum(False))
|
|
274
|
-
] = UNSET
|
|
268
|
+
method: OptionalNullable[Method] = UNSET
|
|
275
269
|
r"""The method used for the transaction."""
|
|
276
270
|
|
|
277
|
-
instrument_type:
|
|
278
|
-
OptionalNullable[InstrumentType], PlainValidator(validate_open_enum(False))
|
|
279
|
-
] = UNSET
|
|
271
|
+
instrument_type: OptionalNullable[InstrumentType] = UNSET
|
|
280
272
|
r"""The name of the instrument used to process the transaction."""
|
|
281
273
|
|
|
282
274
|
error_code: OptionalNullable[str] = UNSET
|
|
@@ -312,19 +304,13 @@ class Transaction(BaseModel):
|
|
|
312
304
|
auth_response_code: OptionalNullable[str] = UNSET
|
|
313
305
|
r"""This is the response description received from the processor."""
|
|
314
306
|
|
|
315
|
-
avs_response_code:
|
|
316
|
-
OptionalNullable[AVSResponseCode], PlainValidator(validate_open_enum(False))
|
|
317
|
-
] = UNSET
|
|
307
|
+
avs_response_code: OptionalNullable[AVSResponseCode] = UNSET
|
|
318
308
|
r"""The response code received from the payment service for the Address Verification Check (AVS). This code is mapped to a standardized Gr4vy AVS response code."""
|
|
319
309
|
|
|
320
|
-
cvv_response_code:
|
|
321
|
-
OptionalNullable[CVVResponseCode], PlainValidator(validate_open_enum(False))
|
|
322
|
-
] = UNSET
|
|
310
|
+
cvv_response_code: OptionalNullable[CVVResponseCode] = UNSET
|
|
323
311
|
r"""The response code received from the payment service for the Card Verification Value (CVV). This code is mapped to a standardized Gr4vy CVV response code."""
|
|
324
312
|
|
|
325
|
-
anti_fraud_decision:
|
|
326
|
-
OptionalNullable[AntiFraudDecision], PlainValidator(validate_open_enum(False))
|
|
327
|
-
] = UNSET
|
|
313
|
+
anti_fraud_decision: OptionalNullable[AntiFraudDecision] = UNSET
|
|
328
314
|
r"""The mapped decision received from the anti-fraud service. In case of a review decision this field is not updated once the review is resolved."""
|
|
329
315
|
|
|
330
316
|
cart_items: OptionalNullable[List[CartItem]] = UNSET
|
|
@@ -5,9 +5,9 @@ from .flow import Flow
|
|
|
5
5
|
from .flowaction import FlowAction
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from gr4vy.types import BaseModel
|
|
8
|
-
from gr4vy.utils import validate_const
|
|
8
|
+
from gr4vy.utils import validate_const
|
|
9
9
|
import pydantic
|
|
10
|
-
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from pydantic.functional_validators import AfterValidator
|
|
11
11
|
from typing import Any, Dict, Literal, Optional
|
|
12
12
|
from typing_extensions import Annotated, TypedDict
|
|
13
13
|
|
|
@@ -26,9 +26,9 @@ class TransactionActionTypedDict(TypedDict):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
class TransactionAction(BaseModel):
|
|
29
|
-
id:
|
|
29
|
+
id: FlowAction
|
|
30
30
|
|
|
31
|
-
flow:
|
|
31
|
+
flow: Flow
|
|
32
32
|
|
|
33
33
|
rule_id: str
|
|
34
34
|
r"""The ID of the rule that triggered this action."""
|
|
@@ -4,10 +4,10 @@ from __future__ import annotations
|
|
|
4
4
|
from .cancelstatus import CancelStatus
|
|
5
5
|
from .transaction import Transaction, TransactionTypedDict
|
|
6
6
|
from gr4vy.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
7
|
-
from gr4vy.utils import validate_const
|
|
7
|
+
from gr4vy.utils import validate_const
|
|
8
8
|
import pydantic
|
|
9
9
|
from pydantic import model_serializer
|
|
10
|
-
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from pydantic.functional_validators import AfterValidator
|
|
11
11
|
from typing import Literal, Optional
|
|
12
12
|
from typing_extensions import Annotated, TypedDict
|
|
13
13
|
|
|
@@ -27,7 +27,7 @@ class TransactionCancelTypedDict(TypedDict):
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
class TransactionCancel(BaseModel):
|
|
30
|
-
status:
|
|
30
|
+
status: CancelStatus
|
|
31
31
|
|
|
32
32
|
code: Nullable[str]
|
|
33
33
|
r"""The standardized error code set by Gr4vy."""
|
|
@@ -4,10 +4,10 @@ from __future__ import annotations
|
|
|
4
4
|
from .capturestatus import CaptureStatus
|
|
5
5
|
from .transaction import Transaction, TransactionTypedDict
|
|
6
6
|
from gr4vy.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
7
|
-
from gr4vy.utils import validate_const
|
|
7
|
+
from gr4vy.utils import validate_const
|
|
8
8
|
import pydantic
|
|
9
9
|
from pydantic import model_serializer
|
|
10
|
-
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from pydantic.functional_validators import AfterValidator
|
|
11
11
|
from typing import Literal, Optional
|
|
12
12
|
from typing_extensions import Annotated, TypedDict
|
|
13
13
|
|
|
@@ -27,7 +27,7 @@ class TransactionCaptureTypedDict(TypedDict):
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
class TransactionCapture(BaseModel):
|
|
30
|
-
status:
|
|
30
|
+
status: CaptureStatus
|
|
31
31
|
|
|
32
32
|
code: Nullable[str]
|
|
33
33
|
r"""The standardized error code set by Gr4vy."""
|