gr4vy 1.5.2__py3-none-any.whl → 1.10.9__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 (169) hide show
  1. gr4vy/_version.py +3 -3
  2. gr4vy/actions.py +307 -0
  3. gr4vy/all.py +4 -2
  4. gr4vy/audit_logs.py +4 -2
  5. gr4vy/balances.py +4 -2
  6. gr4vy/basesdk.py +6 -0
  7. gr4vy/buyers_gift_cards.py +4 -2
  8. gr4vy/buyers_payment_methods.py +4 -2
  9. gr4vy/buyers_sdk.py +28 -18
  10. gr4vy/buyers_shipping_details.py +20 -10
  11. gr4vy/card_scheme_definitions_sdk.py +4 -2
  12. gr4vy/checkout_sessions.py +40 -14
  13. gr4vy/digital_wallets_sdk.py +20 -10
  14. gr4vy/domains.py +8 -4
  15. gr4vy/errors/apierror.py +1 -1
  16. gr4vy/errors/error400.py +1 -5
  17. gr4vy/errors/error401.py +1 -5
  18. gr4vy/errors/error403.py +1 -5
  19. gr4vy/errors/error404.py +1 -5
  20. gr4vy/errors/error405.py +1 -5
  21. gr4vy/errors/error409.py +1 -5
  22. gr4vy/errors/error425.py +1 -5
  23. gr4vy/errors/error429.py +1 -5
  24. gr4vy/errors/error500.py +1 -5
  25. gr4vy/errors/error502.py +1 -5
  26. gr4vy/errors/error504.py +1 -5
  27. gr4vy/errors/gr4vyerror.py +1 -1
  28. gr4vy/errors/httpvalidationerror.py +1 -1
  29. gr4vy/errors/no_response_error.py +1 -1
  30. gr4vy/errors/responsevalidationerror.py +1 -1
  31. gr4vy/events.py +54 -7
  32. gr4vy/executions.py +12 -6
  33. gr4vy/gift_cards_sdk.py +16 -8
  34. gr4vy/jobs.py +4 -2
  35. gr4vy/merchant_accounts_sdk.py +16 -8
  36. gr4vy/models/__init__.py +103 -29
  37. gr4vy/models/adyencardoptions.py +1 -6
  38. gr4vy/models/adyensepaoptions.py +1 -6
  39. gr4vy/models/airline.py +2 -7
  40. gr4vy/models/airlineleg.py +2 -6
  41. gr4vy/models/airlinepassenger.py +2 -6
  42. gr4vy/models/auditlogentry.py +3 -3
  43. gr4vy/models/auditlogentryuser.py +3 -3
  44. gr4vy/models/{billingdetails_input.py → billingdetails.py} +2 -2
  45. gr4vy/models/braintreedynamicdatafieldsoptions.py +2 -7
  46. gr4vy/models/browserinfo.py +2 -4
  47. gr4vy/models/buyer.py +3 -3
  48. gr4vy/models/buyercreate.py +3 -3
  49. gr4vy/models/buyerupdate.py +3 -3
  50. gr4vy/models/cartitem.py +9 -6
  51. gr4vy/models/chaseoptions.py +46 -0
  52. gr4vy/models/checkoutsession.py +24 -3
  53. gr4vy/models/checkoutsessioncreate.py +39 -5
  54. gr4vy/models/checkoutsessionpaymentmethod.py +3 -5
  55. gr4vy/models/checkoutsessionpaymentmethoddetails.py +2 -6
  56. gr4vy/models/create_payment_methodop.py +6 -0
  57. gr4vy/models/createsession.py +3 -3
  58. gr4vy/models/cybersourceoptions.py +7 -0
  59. gr4vy/models/definitionfield.py +1 -6
  60. gr4vy/models/digitalwallet.py +3 -5
  61. gr4vy/models/digitalwalletcreate.py +2 -6
  62. gr4vy/models/dlocalupirecurringinfooptions.py +13 -15
  63. gr4vy/models/errordetail.py +2 -4
  64. gr4vy/models/flow.py +16 -0
  65. gr4vy/models/flowaction.py +16 -0
  66. gr4vy/models/forterantifraudoptions.py +2 -7
  67. gr4vy/models/forterantifraudoptionscartitembasicitemdata.py +4 -8
  68. gr4vy/models/forterantifraudoptionscartitemdeliverydetails.py +3 -6
  69. gr4vy/models/giftcardredemption.py +4 -8
  70. gr4vy/models/giftcardservice.py +3 -5
  71. gr4vy/models/giftcardsummary.py +3 -5
  72. gr4vy/models/{guestbuyer_input.py → guestbuyer.py} +5 -5
  73. gr4vy/models/instrumenttype.py +1 -0
  74. gr4vy/models/integrationclient.py +16 -0
  75. gr4vy/models/list_all_report_executionsop.py +2 -14
  76. gr4vy/models/list_audit_logsop.py +2 -10
  77. gr4vy/models/list_buyer_payment_methodsop.py +2 -3
  78. gr4vy/models/list_payment_methodsop.py +2 -14
  79. gr4vy/models/list_payment_servicesop.py +2 -8
  80. gr4vy/models/list_reportsop.py +2 -10
  81. gr4vy/models/list_transaction_actionsop.py +43 -0
  82. gr4vy/models/list_transaction_eventsop.py +12 -1
  83. gr4vy/models/list_transactionsop.py +4 -22
  84. gr4vy/models/merchantaccount.py +3 -5
  85. gr4vy/models/merchantaccountcreate.py +2 -6
  86. gr4vy/models/merchantaccountupdate.py +2 -6
  87. gr4vy/models/method.py +3 -0
  88. gr4vy/models/mockcardoptions.py +7 -2
  89. gr4vy/models/mode.py +1 -0
  90. gr4vy/models/monatospeioptions.py +15 -0
  91. gr4vy/models/networktoken.py +3 -3
  92. gr4vy/models/networktokenpaymentmethodcreate.py +4 -8
  93. gr4vy/models/nuveiidealoptions.py +49 -0
  94. gr4vy/models/paymentlink.py +18 -7
  95. gr4vy/models/paymentlinkcreate.py +23 -37
  96. gr4vy/models/paymentmethod.py +7 -13
  97. gr4vy/models/paymentmethodcard.py +3 -5
  98. gr4vy/models/paymentmethoddetailscard.py +2 -6
  99. gr4vy/models/paymentmethodsummary.py +6 -12
  100. gr4vy/models/paymentoption.py +3 -3
  101. gr4vy/models/paymentservice.py +4 -6
  102. gr4vy/models/paymentserviceconfiguration.py +2 -6
  103. gr4vy/models/paymentservicedefinition.py +11 -5
  104. gr4vy/models/paymentservicetoken.py +3 -3
  105. gr4vy/models/payoutcreate.py +5 -9
  106. gr4vy/models/payoutsummary.py +4 -6
  107. gr4vy/models/paypaloptions.py +8 -2
  108. gr4vy/models/paypalshippingoptions.py +51 -0
  109. gr4vy/models/paypalshippingoptionsitem.py +89 -0
  110. gr4vy/models/paypalshippingoptionsitemamount.py +20 -0
  111. gr4vy/models/plaidpaymentmethodcreate.py +106 -0
  112. gr4vy/models/redirectpaymentmethodcreate.py +3 -6
  113. gr4vy/models/refund.py +4 -4
  114. gr4vy/models/report.py +4 -6
  115. gr4vy/models/reportcreate.py +2 -3
  116. gr4vy/models/reportexecution.py +3 -3
  117. gr4vy/models/reportexecutionsummary.py +3 -3
  118. gr4vy/models/reportspec.py +2 -4
  119. gr4vy/models/reportsummary.py +3 -5
  120. gr4vy/models/taxid.py +2 -4
  121. gr4vy/models/taxidkind.py +6 -0
  122. gr4vy/models/threedsecuredatav1.py +2 -6
  123. gr4vy/models/threedsecuredatav2.py +2 -6
  124. gr4vy/models/transaction.py +74 -25
  125. gr4vy/models/transactionaction.py +48 -0
  126. gr4vy/models/transactionactions.py +17 -0
  127. gr4vy/models/transactionbuyer.py +3 -3
  128. gr4vy/models/transactioncancel.py +3 -3
  129. gr4vy/models/transactioncapture.py +3 -3
  130. gr4vy/models/transactionconnectionoptions.py +30 -0
  131. gr4vy/models/transactioncreate.py +27 -12
  132. gr4vy/models/transactionevent.py +5 -3
  133. gr4vy/models/transactionpaymentmethod.py +6 -12
  134. gr4vy/models/transactionpaymentservice.py +3 -3
  135. gr4vy/models/transactionrefundcreate.py +2 -6
  136. gr4vy/models/transactionsummary.py +6 -10
  137. gr4vy/models/transactionthreedsecuresummary.py +3 -9
  138. gr4vy/models/transactionvoid.py +3 -3
  139. gr4vy/models/trustlyoptions.py +2 -9
  140. gr4vy/network_tokens_cryptogram.py +4 -2
  141. gr4vy/payment_links_sdk.py +34 -14
  142. gr4vy/payment_methods_network_tokens.py +20 -10
  143. gr4vy/payment_methods_payment_service_tokens.py +12 -6
  144. gr4vy/payment_methods_sdk.py +16 -8
  145. gr4vy/payment_options_sdk.py +4 -2
  146. gr4vy/payment_service_definitions_sdk.py +12 -6
  147. gr4vy/payment_services_sdk.py +28 -14
  148. gr4vy/payouts.py +16 -10
  149. gr4vy/refunds_sdk.py +4 -2
  150. gr4vy/report_executions_sdk.py +4 -2
  151. gr4vy/reports_sdk.py +16 -8
  152. gr4vy/sessions.py +12 -6
  153. gr4vy/transactions.py +99 -28
  154. gr4vy/transactions_refunds.py +12 -6
  155. gr4vy/transactions_settlements.py +8 -4
  156. gr4vy/types/basemodel.py +41 -3
  157. gr4vy/utils/__init__.py +0 -3
  158. gr4vy/utils/enums.py +60 -0
  159. gr4vy/utils/forms.py +21 -10
  160. gr4vy/utils/queryparams.py +14 -2
  161. gr4vy/utils/requestbodies.py +1 -1
  162. gr4vy/utils/retries.py +69 -5
  163. gr4vy/utils/serializers.py +0 -20
  164. gr4vy/utils/unmarshal_json_response.py +15 -1
  165. {gr4vy-1.5.2.dist-info → gr4vy-1.10.9.dist-info}/METADATA +39 -39
  166. {gr4vy-1.5.2.dist-info → gr4vy-1.10.9.dist-info}/RECORD +167 -155
  167. gr4vy/models/billingdetails_output.py +0 -87
  168. gr4vy/models/guestbuyer_output.py +0 -80
  169. {gr4vy-1.5.2.dist-info → gr4vy-1.10.9.dist-info}/WHEEL +0 -0
@@ -3,9 +3,9 @@
3
3
  from __future__ import annotations
4
4
  from .method import Method
5
5
  from gr4vy.types import BaseModel
6
- from gr4vy.utils import validate_const, validate_open_enum
6
+ from gr4vy.utils import validate_const
7
7
  import pydantic
8
- from pydantic.functional_validators import AfterValidator, PlainValidator
8
+ from pydantic.functional_validators import AfterValidator
9
9
  from typing import Literal, Optional
10
10
  from typing_extensions import Annotated, TypedDict
11
11
 
@@ -29,7 +29,7 @@ class TransactionPaymentService(BaseModel):
29
29
  payment_service_definition_id: str
30
30
  r"""The definition ID of the service used to process this payment."""
31
31
 
32
- method: Annotated[Method, PlainValidator(validate_open_enum(False))]
32
+ method: Method
33
33
 
34
34
  display_name: str
35
35
  r"""The display name for the payment service."""
@@ -3,11 +3,9 @@
3
3
  from __future__ import annotations
4
4
  from .refundtargettype import RefundTargetType
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 pydantic.functional_validators import PlainValidator
9
7
  from typing import Optional
10
- from typing_extensions import Annotated, NotRequired, TypedDict
8
+ from typing_extensions import NotRequired, TypedDict
11
9
 
12
10
 
13
11
  class TransactionRefundCreateTypedDict(TypedDict):
@@ -26,9 +24,7 @@ class TransactionRefundCreate(BaseModel):
26
24
  amount: OptionalNullable[int] = UNSET
27
25
  r"""The amount to refund, in the smallest currency unit (e.g., cents). If omitted, a full refund will be requested."""
28
26
 
29
- target_type: Annotated[
30
- Optional[RefundTargetType], PlainValidator(validate_open_enum(False))
31
- ] = None
27
+ target_type: Optional[RefundTargetType] = None
32
28
 
33
29
  target_id: OptionalNullable[str] = UNSET
34
30
  r"""The optional ID of the instrument to refund for. This is only required when the `target_type` is set to `gift-card-redemption`."""
@@ -19,10 +19,10 @@ from .transactionpaymentservice import (
19
19
  from .transactionstatus import TransactionStatus
20
20
  from datetime import datetime
21
21
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
22
- from gr4vy.utils import validate_const, validate_open_enum
22
+ from gr4vy.utils import validate_const
23
23
  import pydantic
24
24
  from pydantic import model_serializer
25
- from pydantic.functional_validators import AfterValidator, PlainValidator
25
+ from pydantic.functional_validators import AfterValidator
26
26
  from typing import List, Literal, Optional
27
27
  from typing_extensions import Annotated, NotRequired, TypedDict
28
28
 
@@ -112,7 +112,7 @@ class TransactionSummary(BaseModel):
112
112
  amount: int
113
113
  r"""The total amount for this transaction across all funding sources including gift cards."""
114
114
 
115
- status: Annotated[TransactionStatus, PlainValidator(validate_open_enum(False))]
115
+ status: TransactionStatus
116
116
 
117
117
  authorized_amount: int
118
118
  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."""
@@ -129,7 +129,7 @@ class TransactionSummary(BaseModel):
129
129
  settled: bool
130
130
  r"""Indicates whether this transaction has been settled."""
131
131
 
132
- intent: Annotated[TransactionIntent, PlainValidator(validate_open_enum(False))]
132
+ intent: TransactionIntent
133
133
 
134
134
  gift_card_redemptions: List[GiftCardRedemption]
135
135
  r"""The gift cards redeemed for this transaction."""
@@ -164,14 +164,10 @@ class TransactionSummary(BaseModel):
164
164
  payment_method: OptionalNullable[TransactionPaymentMethod] = UNSET
165
165
  r"""The payment method used for this transaction."""
166
166
 
167
- method: Annotated[
168
- OptionalNullable[Method], PlainValidator(validate_open_enum(False))
169
- ] = UNSET
167
+ method: OptionalNullable[Method] = UNSET
170
168
  r"""The method used for the transaction."""
171
169
 
172
- instrument_type: Annotated[
173
- OptionalNullable[InstrumentType], PlainValidator(validate_open_enum(False))
174
- ] = UNSET
170
+ instrument_type: OptionalNullable[InstrumentType] = UNSET
175
171
  r"""The name of the instrument used to process the transaction."""
176
172
 
177
173
  error_code: OptionalNullable[str] = UNSET
@@ -7,11 +7,9 @@ from .threedsecuremethod import ThreeDSecureMethod
7
7
  from .threedsecurestatus import ThreeDSecureStatus
8
8
  from .threedsecurev2 import ThreeDSecureV2, ThreeDSecureV2TypedDict
9
9
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
10
- from gr4vy.utils import validate_open_enum
11
10
  from pydantic import model_serializer
12
- from pydantic.functional_validators import PlainValidator
13
11
  from typing import Union
14
- from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
12
+ from typing_extensions import NotRequired, TypeAliasType, TypedDict
15
13
 
16
14
 
17
15
  ResponseDataTypedDict = TypeAliasType(
@@ -41,14 +39,10 @@ class TransactionThreeDSecureSummary(BaseModel):
41
39
  version: OptionalNullable[str] = UNSET
42
40
  r"""The version of 3DS used for this transaction."""
43
41
 
44
- status: Annotated[
45
- OptionalNullable[ThreeDSecureStatus], PlainValidator(validate_open_enum(False))
46
- ] = UNSET
42
+ status: OptionalNullable[ThreeDSecureStatus] = UNSET
47
43
  r"""The status of the 3DS challenge for this transaction."""
48
44
 
49
- method: Annotated[
50
- OptionalNullable[ThreeDSecureMethod], PlainValidator(validate_open_enum(False))
51
- ] = UNSET
45
+ method: OptionalNullable[ThreeDSecureMethod] = UNSET
52
46
  r"""The method used for 3DS authentication for this transaction."""
53
47
 
54
48
  response_data: OptionalNullable[ResponseData] = UNSET
@@ -4,10 +4,10 @@ from __future__ import annotations
4
4
  from .transaction import Transaction, TransactionTypedDict
5
5
  from .voidstatus import VoidStatus
6
6
  from gr4vy.types import BaseModel, Nullable, UNSET_SENTINEL
7
- from gr4vy.utils import validate_const, validate_open_enum
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, PlainValidator
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 TransactionVoidTypedDict(TypedDict):
27
27
 
28
28
 
29
29
  class TransactionVoid(BaseModel):
30
- status: Annotated[VoidStatus, PlainValidator(validate_open_enum(False))]
30
+ status: VoidStatus
31
31
 
32
32
  code: Nullable[str]
33
33
  r"""The standardized error code set by Gr4vy."""
@@ -10,8 +10,6 @@ from typing_extensions import Annotated, NotRequired, TypedDict
10
10
  class TrustlyOptionsTypedDict(TypedDict):
11
11
  refresh_split_token: NotRequired[Nullable[bool]]
12
12
  r"""Indicates to Gr4vy whether or not the stored Trustly agreement needs refreshing."""
13
- url_scheme: NotRequired[Nullable[str]]
14
- r"""URL scheme for an app."""
15
13
 
16
14
 
17
15
  class TrustlyOptions(BaseModel):
@@ -20,15 +18,10 @@ class TrustlyOptions(BaseModel):
20
18
  ] = UNSET
21
19
  r"""Indicates to Gr4vy whether or not the stored Trustly agreement needs refreshing."""
22
20
 
23
- url_scheme: Annotated[OptionalNullable[str], pydantic.Field(alias="urlScheme")] = (
24
- UNSET
25
- )
26
- r"""URL scheme for an app."""
27
-
28
21
  @model_serializer(mode="wrap")
29
22
  def serialize_model(self, handler):
30
- optional_fields = ["refreshSplitToken", "urlScheme"]
31
- nullable_fields = ["refreshSplitToken", "urlScheme"]
23
+ optional_fields = ["refreshSplitToken"]
24
+ nullable_fields = ["refreshSplitToken"]
32
25
  null_default_fields = []
33
26
 
34
27
  serialized = handler(self)
@@ -73,6 +73,7 @@ class NetworkTokensCryptogram(BaseSDK):
73
73
  get_serialized_body=lambda: utils.serialize_request_body(
74
74
  request.cryptogram_create, False, False, "json", models.CryptogramCreate
75
75
  ),
76
+ allow_empty_value=None,
76
77
  timeout_ms=timeout_ms,
77
78
  )
78
79
 
@@ -89,7 +90,7 @@ class NetworkTokensCryptogram(BaseSDK):
89
90
  config=self.sdk_configuration,
90
91
  base_url=base_url or "",
91
92
  operation_id="create_payment_method_network_token_cryptogram",
92
- oauth2_scopes=[],
93
+ oauth2_scopes=None,
93
94
  security_source=get_security_from_env(
94
95
  self.sdk_configuration.security, models.Security
95
96
  ),
@@ -227,6 +228,7 @@ class NetworkTokensCryptogram(BaseSDK):
227
228
  get_serialized_body=lambda: utils.serialize_request_body(
228
229
  request.cryptogram_create, False, False, "json", models.CryptogramCreate
229
230
  ),
231
+ allow_empty_value=None,
230
232
  timeout_ms=timeout_ms,
231
233
  )
232
234
 
@@ -243,7 +245,7 @@ class NetworkTokensCryptogram(BaseSDK):
243
245
  config=self.sdk_configuration,
244
246
  base_url=base_url or "",
245
247
  operation_id="create_payment_method_network_token_cryptogram",
246
- oauth2_scopes=[],
248
+ oauth2_scopes=None,
247
249
  security_source=get_security_from_env(
248
250
  self.sdk_configuration.security, models.Security
249
251
  ),
@@ -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[
@@ -33,7 +33,7 @@ class PaymentLinksSDK(BaseSDK):
33
33
  statement_descriptor: OptionalNullable[
34
34
  Union[models.StatementDescriptor, models.StatementDescriptorTypedDict]
35
35
  ] = UNSET,
36
- locale: OptionalNullable[models.Locale] = UNSET,
36
+ locale: OptionalNullable[str] = UNSET,
37
37
  merchant_name: OptionalNullable[str] = UNSET,
38
38
  merchant_url: OptionalNullable[str] = UNSET,
39
39
  merchant_banner_url: OptionalNullable[str] = UNSET,
@@ -48,6 +48,8 @@ class PaymentLinksSDK(BaseSDK):
48
48
  ] = UNSET,
49
49
  metadata: OptionalNullable[Dict[str, Any]] = UNSET,
50
50
  payment_source: Optional[models.TransactionPaymentSource] = None,
51
+ store: Optional[bool] = False,
52
+ buyer_id: OptionalNullable[str] = UNSET,
51
53
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
52
54
  server_url: Optional[str] = None,
53
55
  timeout_ms: Optional[int] = None,
@@ -79,6 +81,8 @@ class PaymentLinksSDK(BaseSDK):
79
81
  :param cart_items: The cart items for the payment link.
80
82
  :param metadata: Arbitrary metadata for the payment link.
81
83
  :param payment_source: The way payment method information made it to this transaction.
84
+ :param store: Whether to store the payment method for future use.
85
+ :param buyer_id: The ID of the buyer to associate the payment method with. Note: When `buyer_id` is provided, the payment link should be treated as a secret as it will allow the user to manage payment methods for the associated buyer.
82
86
  :param retries: Override the default retry configuration for this method
83
87
  :param server_url: Override the default server URL for this method
84
88
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -98,7 +102,7 @@ class PaymentLinksSDK(BaseSDK):
98
102
  merchant_account_id=merchant_account_id,
99
103
  payment_link_create=models.PaymentLinkCreate(
100
104
  buyer=utils.get_pydantic_model(
101
- buyer, OptionalNullable[models.GuestBuyerInput]
105
+ buyer, OptionalNullable[models.GuestBuyer]
102
106
  ),
103
107
  expires_at=expires_at,
104
108
  connection_options=utils.get_pydantic_model(
@@ -127,6 +131,8 @@ class PaymentLinksSDK(BaseSDK):
127
131
  ),
128
132
  metadata=metadata,
129
133
  payment_source=payment_source,
134
+ store=store,
135
+ buyer_id=buyer_id,
130
136
  ),
131
137
  )
132
138
 
@@ -153,6 +159,7 @@ class PaymentLinksSDK(BaseSDK):
153
159
  "json",
154
160
  models.PaymentLinkCreate,
155
161
  ),
162
+ allow_empty_value=None,
156
163
  timeout_ms=timeout_ms,
157
164
  )
158
165
 
@@ -169,7 +176,7 @@ class PaymentLinksSDK(BaseSDK):
169
176
  config=self.sdk_configuration,
170
177
  base_url=base_url or "",
171
178
  operation_id="add_payment_link",
172
- oauth2_scopes=[],
179
+ oauth2_scopes=None,
173
180
  security_source=get_security_from_env(
174
181
  self.sdk_configuration.security, models.Security
175
182
  ),
@@ -252,7 +259,7 @@ class PaymentLinksSDK(BaseSDK):
252
259
  currency: str,
253
260
  merchant_account_id: Optional[str] = None,
254
261
  buyer: OptionalNullable[
255
- Union[models.GuestBuyerInput, models.GuestBuyerInputTypedDict]
262
+ Union[models.GuestBuyer, models.GuestBuyerTypedDict]
256
263
  ] = UNSET,
257
264
  expires_at: OptionalNullable[datetime] = UNSET,
258
265
  connection_options: OptionalNullable[
@@ -265,7 +272,7 @@ class PaymentLinksSDK(BaseSDK):
265
272
  statement_descriptor: OptionalNullable[
266
273
  Union[models.StatementDescriptor, models.StatementDescriptorTypedDict]
267
274
  ] = UNSET,
268
- locale: OptionalNullable[models.Locale] = UNSET,
275
+ locale: OptionalNullable[str] = UNSET,
269
276
  merchant_name: OptionalNullable[str] = UNSET,
270
277
  merchant_url: OptionalNullable[str] = UNSET,
271
278
  merchant_banner_url: OptionalNullable[str] = UNSET,
@@ -280,6 +287,8 @@ class PaymentLinksSDK(BaseSDK):
280
287
  ] = UNSET,
281
288
  metadata: OptionalNullable[Dict[str, Any]] = UNSET,
282
289
  payment_source: Optional[models.TransactionPaymentSource] = None,
290
+ store: Optional[bool] = False,
291
+ buyer_id: OptionalNullable[str] = UNSET,
283
292
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
284
293
  server_url: Optional[str] = None,
285
294
  timeout_ms: Optional[int] = None,
@@ -311,6 +320,8 @@ class PaymentLinksSDK(BaseSDK):
311
320
  :param cart_items: The cart items for the payment link.
312
321
  :param metadata: Arbitrary metadata for the payment link.
313
322
  :param payment_source: The way payment method information made it to this transaction.
323
+ :param store: Whether to store the payment method for future use.
324
+ :param buyer_id: The ID of the buyer to associate the payment method with. Note: When `buyer_id` is provided, the payment link should be treated as a secret as it will allow the user to manage payment methods for the associated buyer.
314
325
  :param retries: Override the default retry configuration for this method
315
326
  :param server_url: Override the default server URL for this method
316
327
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -330,7 +341,7 @@ class PaymentLinksSDK(BaseSDK):
330
341
  merchant_account_id=merchant_account_id,
331
342
  payment_link_create=models.PaymentLinkCreate(
332
343
  buyer=utils.get_pydantic_model(
333
- buyer, OptionalNullable[models.GuestBuyerInput]
344
+ buyer, OptionalNullable[models.GuestBuyer]
334
345
  ),
335
346
  expires_at=expires_at,
336
347
  connection_options=utils.get_pydantic_model(
@@ -359,6 +370,8 @@ class PaymentLinksSDK(BaseSDK):
359
370
  ),
360
371
  metadata=metadata,
361
372
  payment_source=payment_source,
373
+ store=store,
374
+ buyer_id=buyer_id,
362
375
  ),
363
376
  )
364
377
 
@@ -385,6 +398,7 @@ class PaymentLinksSDK(BaseSDK):
385
398
  "json",
386
399
  models.PaymentLinkCreate,
387
400
  ),
401
+ allow_empty_value=None,
388
402
  timeout_ms=timeout_ms,
389
403
  )
390
404
 
@@ -401,7 +415,7 @@ class PaymentLinksSDK(BaseSDK):
401
415
  config=self.sdk_configuration,
402
416
  base_url=base_url or "",
403
417
  operation_id="add_payment_link",
404
- oauth2_scopes=[],
418
+ oauth2_scopes=None,
405
419
  security_source=get_security_from_env(
406
420
  self.sdk_configuration.security, models.Security
407
421
  ),
@@ -534,6 +548,7 @@ class PaymentLinksSDK(BaseSDK):
534
548
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
535
549
  ),
536
550
  security=self.sdk_configuration.security,
551
+ allow_empty_value=None,
537
552
  timeout_ms=timeout_ms,
538
553
  )
539
554
 
@@ -554,7 +569,7 @@ class PaymentLinksSDK(BaseSDK):
554
569
  config=self.sdk_configuration,
555
570
  base_url=base_url or "",
556
571
  operation_id="list_payment_links",
557
- oauth2_scopes=[],
572
+ oauth2_scopes=None,
558
573
  security_source=get_security_from_env(
559
574
  self.sdk_configuration.security, models.Security
560
575
  ),
@@ -709,6 +724,7 @@ class PaymentLinksSDK(BaseSDK):
709
724
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
710
725
  ),
711
726
  security=self.sdk_configuration.security,
727
+ allow_empty_value=None,
712
728
  timeout_ms=timeout_ms,
713
729
  )
714
730
 
@@ -729,7 +745,7 @@ class PaymentLinksSDK(BaseSDK):
729
745
  config=self.sdk_configuration,
730
746
  base_url=base_url or "",
731
747
  operation_id="list_payment_links",
732
- oauth2_scopes=[],
748
+ oauth2_scopes=None,
733
749
  security_source=get_security_from_env(
734
750
  self.sdk_configuration.security, models.Security
735
751
  ),
@@ -878,6 +894,7 @@ class PaymentLinksSDK(BaseSDK):
878
894
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
879
895
  ),
880
896
  security=self.sdk_configuration.security,
897
+ allow_empty_value=None,
881
898
  timeout_ms=timeout_ms,
882
899
  )
883
900
 
@@ -894,7 +911,7 @@ class PaymentLinksSDK(BaseSDK):
894
911
  config=self.sdk_configuration,
895
912
  base_url=base_url or "",
896
913
  operation_id="expire_payment_link",
897
- oauth2_scopes=[],
914
+ oauth2_scopes=None,
898
915
  security_source=get_security_from_env(
899
916
  self.sdk_configuration.security, models.Security
900
917
  ),
@@ -1021,6 +1038,7 @@ class PaymentLinksSDK(BaseSDK):
1021
1038
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
1022
1039
  ),
1023
1040
  security=self.sdk_configuration.security,
1041
+ allow_empty_value=None,
1024
1042
  timeout_ms=timeout_ms,
1025
1043
  )
1026
1044
 
@@ -1037,7 +1055,7 @@ class PaymentLinksSDK(BaseSDK):
1037
1055
  config=self.sdk_configuration,
1038
1056
  base_url=base_url or "",
1039
1057
  operation_id="expire_payment_link",
1040
- oauth2_scopes=[],
1058
+ oauth2_scopes=None,
1041
1059
  security_source=get_security_from_env(
1042
1060
  self.sdk_configuration.security, models.Security
1043
1061
  ),
@@ -1164,6 +1182,7 @@ class PaymentLinksSDK(BaseSDK):
1164
1182
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
1165
1183
  ),
1166
1184
  security=self.sdk_configuration.security,
1185
+ allow_empty_value=None,
1167
1186
  timeout_ms=timeout_ms,
1168
1187
  )
1169
1188
 
@@ -1184,7 +1203,7 @@ class PaymentLinksSDK(BaseSDK):
1184
1203
  config=self.sdk_configuration,
1185
1204
  base_url=base_url or "",
1186
1205
  operation_id="get_payment_link",
1187
- oauth2_scopes=[],
1206
+ oauth2_scopes=None,
1188
1207
  security_source=get_security_from_env(
1189
1208
  self.sdk_configuration.security, models.Security
1190
1209
  ),
@@ -1311,6 +1330,7 @@ class PaymentLinksSDK(BaseSDK):
1311
1330
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
1312
1331
  ),
1313
1332
  security=self.sdk_configuration.security,
1333
+ allow_empty_value=None,
1314
1334
  timeout_ms=timeout_ms,
1315
1335
  )
1316
1336
 
@@ -1331,7 +1351,7 @@ class PaymentLinksSDK(BaseSDK):
1331
1351
  config=self.sdk_configuration,
1332
1352
  base_url=base_url or "",
1333
1353
  operation_id="get_payment_link",
1334
- oauth2_scopes=[],
1354
+ oauth2_scopes=None,
1335
1355
  security_source=get_security_from_env(
1336
1356
  self.sdk_configuration.security, models.Security
1337
1357
  ),
@@ -78,6 +78,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
78
78
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
79
79
  ),
80
80
  security=self.sdk_configuration.security,
81
+ allow_empty_value=None,
81
82
  timeout_ms=timeout_ms,
82
83
  )
83
84
 
@@ -98,7 +99,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
98
99
  config=self.sdk_configuration,
99
100
  base_url=base_url or "",
100
101
  operation_id="list_payment_method_network_tokens",
101
- oauth2_scopes=[],
102
+ oauth2_scopes=None,
102
103
  security_source=get_security_from_env(
103
104
  self.sdk_configuration.security, models.Security
104
105
  ),
@@ -225,6 +226,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
225
226
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
226
227
  ),
227
228
  security=self.sdk_configuration.security,
229
+ allow_empty_value=None,
228
230
  timeout_ms=timeout_ms,
229
231
  )
230
232
 
@@ -245,7 +247,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
245
247
  config=self.sdk_configuration,
246
248
  base_url=base_url or "",
247
249
  operation_id="list_payment_method_network_tokens",
248
- oauth2_scopes=[],
250
+ oauth2_scopes=None,
249
251
  security_source=get_security_from_env(
250
252
  self.sdk_configuration.security, models.Security
251
253
  ),
@@ -390,6 +392,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
390
392
  "json",
391
393
  models.NetworkTokenCreate,
392
394
  ),
395
+ allow_empty_value=None,
393
396
  timeout_ms=timeout_ms,
394
397
  )
395
398
 
@@ -406,7 +409,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
406
409
  config=self.sdk_configuration,
407
410
  base_url=base_url or "",
408
411
  operation_id="create_payment_method_network_token",
409
- oauth2_scopes=[],
412
+ oauth2_scopes=None,
410
413
  security_source=get_security_from_env(
411
414
  self.sdk_configuration.security, models.Security
412
415
  ),
@@ -551,6 +554,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
551
554
  "json",
552
555
  models.NetworkTokenCreate,
553
556
  ),
557
+ allow_empty_value=None,
554
558
  timeout_ms=timeout_ms,
555
559
  )
556
560
 
@@ -567,7 +571,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
567
571
  config=self.sdk_configuration,
568
572
  base_url=base_url or "",
569
573
  operation_id="create_payment_method_network_token",
570
- oauth2_scopes=[],
574
+ oauth2_scopes=None,
571
575
  security_source=get_security_from_env(
572
576
  self.sdk_configuration.security, models.Security
573
577
  ),
@@ -697,6 +701,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
697
701
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
698
702
  ),
699
703
  security=self.sdk_configuration.security,
704
+ allow_empty_value=None,
700
705
  timeout_ms=timeout_ms,
701
706
  )
702
707
 
@@ -713,7 +718,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
713
718
  config=self.sdk_configuration,
714
719
  base_url=base_url or "",
715
720
  operation_id="suspend_payment_method_network_token",
716
- oauth2_scopes=[],
721
+ oauth2_scopes=None,
717
722
  security_source=get_security_from_env(
718
723
  self.sdk_configuration.security, models.Security
719
724
  ),
@@ -843,6 +848,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
843
848
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
844
849
  ),
845
850
  security=self.sdk_configuration.security,
851
+ allow_empty_value=None,
846
852
  timeout_ms=timeout_ms,
847
853
  )
848
854
 
@@ -859,7 +865,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
859
865
  config=self.sdk_configuration,
860
866
  base_url=base_url or "",
861
867
  operation_id="suspend_payment_method_network_token",
862
- oauth2_scopes=[],
868
+ oauth2_scopes=None,
863
869
  security_source=get_security_from_env(
864
870
  self.sdk_configuration.security, models.Security
865
871
  ),
@@ -989,6 +995,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
989
995
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
990
996
  ),
991
997
  security=self.sdk_configuration.security,
998
+ allow_empty_value=None,
992
999
  timeout_ms=timeout_ms,
993
1000
  )
994
1001
 
@@ -1005,7 +1012,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
1005
1012
  config=self.sdk_configuration,
1006
1013
  base_url=base_url or "",
1007
1014
  operation_id="resume_payment_method_network_token",
1008
- oauth2_scopes=[],
1015
+ oauth2_scopes=None,
1009
1016
  security_source=get_security_from_env(
1010
1017
  self.sdk_configuration.security, models.Security
1011
1018
  ),
@@ -1135,6 +1142,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
1135
1142
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
1136
1143
  ),
1137
1144
  security=self.sdk_configuration.security,
1145
+ allow_empty_value=None,
1138
1146
  timeout_ms=timeout_ms,
1139
1147
  )
1140
1148
 
@@ -1151,7 +1159,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
1151
1159
  config=self.sdk_configuration,
1152
1160
  base_url=base_url or "",
1153
1161
  operation_id="resume_payment_method_network_token",
1154
- oauth2_scopes=[],
1162
+ oauth2_scopes=None,
1155
1163
  security_source=get_security_from_env(
1156
1164
  self.sdk_configuration.security, models.Security
1157
1165
  ),
@@ -1281,6 +1289,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
1281
1289
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
1282
1290
  ),
1283
1291
  security=self.sdk_configuration.security,
1292
+ allow_empty_value=None,
1284
1293
  timeout_ms=timeout_ms,
1285
1294
  )
1286
1295
 
@@ -1297,7 +1306,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
1297
1306
  config=self.sdk_configuration,
1298
1307
  base_url=base_url or "",
1299
1308
  operation_id="delete_payment_method_network_token",
1300
- oauth2_scopes=[],
1309
+ oauth2_scopes=None,
1301
1310
  security_source=get_security_from_env(
1302
1311
  self.sdk_configuration.security, models.Security
1303
1312
  ),
@@ -1427,6 +1436,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
1427
1436
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
1428
1437
  ),
1429
1438
  security=self.sdk_configuration.security,
1439
+ allow_empty_value=None,
1430
1440
  timeout_ms=timeout_ms,
1431
1441
  )
1432
1442
 
@@ -1443,7 +1453,7 @@ class PaymentMethodsNetworkTokens(BaseSDK):
1443
1453
  config=self.sdk_configuration,
1444
1454
  base_url=base_url or "",
1445
1455
  operation_id="delete_payment_method_network_token",
1446
- oauth2_scopes=[],
1456
+ oauth2_scopes=None,
1447
1457
  security_source=get_security_from_env(
1448
1458
  self.sdk_configuration.security, models.Security
1449
1459
  ),