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
gr4vy/transactions.py CHANGED
@@ -5,6 +5,7 @@ from .sdkconfiguration import SDKConfiguration
5
5
  from datetime import datetime
6
6
  from gr4vy import errors, models, utils
7
7
  from gr4vy._hooks import HookContext
8
+ from gr4vy.actions import Actions
8
9
  from gr4vy.events import Events
9
10
  from gr4vy.transactions_refunds import TransactionsRefunds
10
11
  from gr4vy.transactions_settlements import TransactionsSettlements
@@ -17,6 +18,7 @@ from typing import Any, Dict, List, Mapping, Optional, Union
17
18
 
18
19
  class Transactions(BaseSDK):
19
20
  refunds: TransactionsRefunds
21
+ actions: Actions
20
22
  events: Events
21
23
  settlements: TransactionsSettlements
22
24
 
@@ -31,6 +33,7 @@ class Transactions(BaseSDK):
31
33
  self.refunds = TransactionsRefunds(
32
34
  self.sdk_configuration, parent_ref=self.parent_ref
33
35
  )
36
+ self.actions = Actions(self.sdk_configuration, parent_ref=self.parent_ref)
34
37
  self.events = Events(self.sdk_configuration, parent_ref=self.parent_ref)
35
38
  self.settlements = TransactionsSettlements(
36
39
  self.sdk_configuration, parent_ref=self.parent_ref
@@ -217,6 +220,7 @@ class Transactions(BaseSDK):
217
220
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
218
221
  ),
219
222
  security=self.sdk_configuration.security,
223
+ allow_empty_value=None,
220
224
  timeout_ms=timeout_ms,
221
225
  )
222
226
 
@@ -237,7 +241,7 @@ class Transactions(BaseSDK):
237
241
  config=self.sdk_configuration,
238
242
  base_url=base_url or "",
239
243
  operation_id="list_transactions",
240
- oauth2_scopes=[],
244
+ oauth2_scopes=None,
241
245
  security_source=get_security_from_env(
242
246
  self.sdk_configuration.security, models.Security
243
247
  ),
@@ -556,6 +560,7 @@ class Transactions(BaseSDK):
556
560
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
557
561
  ),
558
562
  security=self.sdk_configuration.security,
563
+ allow_empty_value=None,
559
564
  timeout_ms=timeout_ms,
560
565
  )
561
566
 
@@ -576,7 +581,7 @@ class Transactions(BaseSDK):
576
581
  config=self.sdk_configuration,
577
582
  base_url=base_url or "",
578
583
  operation_id="list_transactions",
579
- oauth2_scopes=[],
584
+ oauth2_scopes=None,
580
585
  security_source=get_security_from_env(
581
586
  self.sdk_configuration.security, models.Security
582
587
  ),
@@ -730,7 +735,7 @@ class Transactions(BaseSDK):
730
735
  ]
731
736
  ] = UNSET,
732
737
  buyer: OptionalNullable[
733
- Union[models.GuestBuyerInput, models.GuestBuyerInputTypedDict]
738
+ Union[models.GuestBuyer, models.GuestBuyerTypedDict]
734
739
  ] = UNSET,
735
740
  buyer_id: OptionalNullable[str] = UNSET,
736
741
  buyer_external_identifier: OptionalNullable[str] = UNSET,
@@ -778,11 +783,13 @@ class Transactions(BaseSDK):
778
783
  installment_count: OptionalNullable[int] = UNSET,
779
784
  tax_amount: OptionalNullable[int] = UNSET,
780
785
  merchant_tax_id: OptionalNullable[str] = UNSET,
786
+ purchase_order_number: OptionalNullable[str] = UNSET,
781
787
  customer_reference_number: OptionalNullable[str] = UNSET,
782
788
  amount_includes_tax: OptionalNullable[bool] = UNSET,
783
789
  supplier_order_number: OptionalNullable[str] = UNSET,
784
790
  duty_amount: OptionalNullable[int] = UNSET,
785
791
  shipping_amount: OptionalNullable[int] = UNSET,
792
+ integration_client: OptionalNullable[models.IntegrationClient] = UNSET,
786
793
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
787
794
  server_url: Optional[str] = None,
788
795
  timeout_ms: Optional[int] = None,
@@ -796,7 +803,9 @@ class Transactions(BaseSDK):
796
803
  :param currency: A supported ISO 4217 currency code. For redirect requests, this value must match the one specified for `currency` in `payment_method`.
797
804
  :param merchant_account_id: The ID of the merchant account to use for this request.
798
805
  :param idempotency_key: A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions.
799
- :param x_forwarded_for: The IP address to forward from the customer. Use this when calling our API from the server side to ensure the customer's address is passed to downstream services, rather than your server IP.
806
+ :param x_forwarded_for: The IP address to forward from the customer. Use this when calling
807
+ our API from the server side to ensure the customer's address is
808
+ passed to downstream services, rather than your server IP.
800
809
  :param country: 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.
801
810
  :param payment_method: The optional payment method to use for this transaction. This field is required if no `gift_cards` have been added.
802
811
  :param buyer: 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.
@@ -805,10 +814,23 @@ class Transactions(BaseSDK):
805
814
  :param gift_cards: The optional gift card(s) to use for this transaction. At least one gift card is required if no other `payment_method` has been added. By default, only a maximum limit of 10 gift cards may be used in a single transaction. Please contact our team to change this limit.
806
815
  :param external_identifier: An external identifier that can be used to match the transaction against your own records.
807
816
  :param intent:
808
- :param store: Whether or not to also try and store the payment method with us so that it can be used again for future use. This is only supported for payment methods that support this feature. There are also a few restrictions on how the flag may be set: * The flag has to be set to `true` when the `payment_source` is set to `recurring` or `installment`, and `merchant_initiated` is set to `false`. * The flag has to be set to `false` (or not set) when using a previously vaulted payment method.
817
+ :param store: Whether or not to also try and store the payment method with us so that it can be used again for future use. This is only supported for payment methods that support this feature. There are also a few restrictions on how the flag may be set:
818
+
819
+ * The flag has to be set to `true` when the `payment_source` is set to `recurring` or `installment`, and `merchant_initiated` is set to `false`.
820
+ * The flag has to be set to `false` (or not set) when using a previously vaulted payment method.
809
821
  :param three_d_secure_data: Pass through 3-D Secure data to support external 3-D Secure authorisation. If using an external 3-D Secure provider, you should not pass a `redirect_url` in the `payment_method` object for a transaction.
810
822
  :param metadata: Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it.
811
- :param is_subsequent_payment: Indicates whether the transaction represents a subsequent payment coming from a setup recurring payment. Please note there are some restrictions on how this flag may be used. The flag can only be `false` (or not set) when the transaction meets one of the following criteria: * It is not `merchant_initiated`. * `payment_source` is set to `card_on_file`. The flag can only be set to `true` when the transaction meets one of the following criteria: * It is not `merchant_initiated`. * `payment_source` is set to `recurring` or `installment` and `merchant_initiated` is set to `true`. * `payment_source` is set to `card_on_file`.
823
+ :param is_subsequent_payment: Indicates whether the transaction represents a subsequent payment coming from a setup recurring payment. Please note there are some restrictions on how this flag may be used.
824
+
825
+ The flag can only be `false` (or not set) when the transaction meets one of the following criteria:
826
+
827
+ * It is not `merchant_initiated`.
828
+ * `payment_source` is set to `card_on_file`.
829
+
830
+ The flag can only be set to `true` when the transaction meets one of the following criteria:
831
+ * It is not `merchant_initiated`.
832
+ * `payment_source` is set to `recurring` or `installment` and `merchant_initiated` is set to `true`.
833
+ * `payment_source` is set to `card_on_file`.
812
834
  :param merchant_initiated: Indicates whether the transaction was initiated by the merchant (true) or customer (false).
813
835
  :param payment_source: The way payment method information made it to this transaction.
814
836
  :param airline: The airline addendum data which describes the airline booking associated with this transaction.
@@ -818,7 +840,12 @@ class Transactions(BaseSDK):
818
840
  :param browser_info: Information about the browser used by the buyer. This can be used by anti-fraud services.
819
841
  :param shipping_details_id: The unique identifier of a set of shipping details stored for the buyer. If provided, the created transaction will include a copy of the details at the point of transaction creation; i.e. it will not be affected by later changes to the detail in the database.
820
842
  :param connection_options: Allows for passing optional configuration per connection to take advantage of connection specific features. When provided, the data is only passed to the target connection type to prevent sharing configuration across connections. Please note that each of the keys this object are in kebab-case, for example `cybersource-anti-fraud` as they represent the ID of the connector. All the other keys will be snake case, for example `merchant_defined_data` or camel case to match an external API that the connector uses.
821
- :param async_capture: Whether to capture the transaction asynchronously. - When `async_capture` is `false` (default), the transaction is captured in the same request. - When `async_capture` is `true`, the transaction is automatically captured at a later time. Redirect transactions are not affected by this flag. This flag can only be set to `true` when `intent` is set to `capture`.
843
+ :param async_capture: Whether to capture the transaction asynchronously.
844
+
845
+ - When `async_capture` is `false` (default), the transaction is captured in the same request.
846
+ - When `async_capture` is `true`, the transaction is automatically captured at a later time.
847
+
848
+ Redirect transactions are not affected by this flag. This flag can only be set to `true` when `intent` is set to `capture`.
822
849
  :param anti_fraud_fingerprint: This field represents the fingerprint data to be passed to the active anti-fraud service.
823
850
  :param payment_service_id: The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped.
824
851
  :param account_funding_transaction: Marks the transaction as an AFT. Requires the payment service to support this feature, and might `recipient` and `buyer` data
@@ -827,11 +854,13 @@ class Transactions(BaseSDK):
827
854
  :param installment_count: The number of installments a buyer is required to make.
828
855
  :param tax_amount: The sales tax amount for this transaction, represented as a monetary amount in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`
829
856
  :param merchant_tax_id: Merchant tax ID (for example, EIN or VAT number).
857
+ :param purchase_order_number: Invoice number or Purchase Order number.
830
858
  :param customer_reference_number: Customer code or reference.
831
859
  :param amount_includes_tax: Whether the tax is included in the amount.
832
860
  :param supplier_order_number: The merchant's unique identifier for the sales order or invoice.
833
861
  :param duty_amount: Total charges for import/export duties.
834
862
  :param shipping_amount: Total shipping amount.
863
+ :param integration_client: Defines the client where the session for this transaction is going to be used. Please refer to the connections documentation for more guidance.
835
864
  :param retries: Override the default retry configuration for this method
836
865
  :param server_url: Override the default server URL for this method
837
866
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -860,7 +889,7 @@ class Transactions(BaseSDK):
860
889
  OptionalNullable[models.TransactionCreatePaymentMethod],
861
890
  ),
862
891
  buyer=utils.get_pydantic_model(
863
- buyer, OptionalNullable[models.GuestBuyerInput]
892
+ buyer, OptionalNullable[models.GuestBuyer]
864
893
  ),
865
894
  buyer_id=buyer_id,
866
895
  buyer_external_identifier=buyer_external_identifier,
@@ -906,11 +935,13 @@ class Transactions(BaseSDK):
906
935
  installment_count=installment_count,
907
936
  tax_amount=tax_amount,
908
937
  merchant_tax_id=merchant_tax_id,
938
+ purchase_order_number=purchase_order_number,
909
939
  customer_reference_number=customer_reference_number,
910
940
  amount_includes_tax=amount_includes_tax,
911
941
  supplier_order_number=supplier_order_number,
912
942
  duty_amount=duty_amount,
913
943
  shipping_amount=shipping_amount,
944
+ integration_client=integration_client,
914
945
  ),
915
946
  )
916
947
 
@@ -937,6 +968,7 @@ class Transactions(BaseSDK):
937
968
  "json",
938
969
  models.TransactionCreate,
939
970
  ),
971
+ allow_empty_value=None,
940
972
  timeout_ms=timeout_ms,
941
973
  )
942
974
 
@@ -953,7 +985,7 @@ class Transactions(BaseSDK):
953
985
  config=self.sdk_configuration,
954
986
  base_url=base_url or "",
955
987
  operation_id="create_transaction",
956
- oauth2_scopes=[],
988
+ oauth2_scopes=None,
957
989
  security_source=get_security_from_env(
958
990
  self.sdk_configuration.security, models.Security
959
991
  ),
@@ -1044,7 +1076,7 @@ class Transactions(BaseSDK):
1044
1076
  ]
1045
1077
  ] = UNSET,
1046
1078
  buyer: OptionalNullable[
1047
- Union[models.GuestBuyerInput, models.GuestBuyerInputTypedDict]
1079
+ Union[models.GuestBuyer, models.GuestBuyerTypedDict]
1048
1080
  ] = UNSET,
1049
1081
  buyer_id: OptionalNullable[str] = UNSET,
1050
1082
  buyer_external_identifier: OptionalNullable[str] = UNSET,
@@ -1092,11 +1124,13 @@ class Transactions(BaseSDK):
1092
1124
  installment_count: OptionalNullable[int] = UNSET,
1093
1125
  tax_amount: OptionalNullable[int] = UNSET,
1094
1126
  merchant_tax_id: OptionalNullable[str] = UNSET,
1127
+ purchase_order_number: OptionalNullable[str] = UNSET,
1095
1128
  customer_reference_number: OptionalNullable[str] = UNSET,
1096
1129
  amount_includes_tax: OptionalNullable[bool] = UNSET,
1097
1130
  supplier_order_number: OptionalNullable[str] = UNSET,
1098
1131
  duty_amount: OptionalNullable[int] = UNSET,
1099
1132
  shipping_amount: OptionalNullable[int] = UNSET,
1133
+ integration_client: OptionalNullable[models.IntegrationClient] = UNSET,
1100
1134
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1101
1135
  server_url: Optional[str] = None,
1102
1136
  timeout_ms: Optional[int] = None,
@@ -1110,7 +1144,9 @@ class Transactions(BaseSDK):
1110
1144
  :param currency: A supported ISO 4217 currency code. For redirect requests, this value must match the one specified for `currency` in `payment_method`.
1111
1145
  :param merchant_account_id: The ID of the merchant account to use for this request.
1112
1146
  :param idempotency_key: A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions.
1113
- :param x_forwarded_for: The IP address to forward from the customer. Use this when calling our API from the server side to ensure the customer's address is passed to downstream services, rather than your server IP.
1147
+ :param x_forwarded_for: The IP address to forward from the customer. Use this when calling
1148
+ our API from the server side to ensure the customer's address is
1149
+ passed to downstream services, rather than your server IP.
1114
1150
  :param country: 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.
1115
1151
  :param payment_method: The optional payment method to use for this transaction. This field is required if no `gift_cards` have been added.
1116
1152
  :param buyer: 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.
@@ -1119,10 +1155,23 @@ class Transactions(BaseSDK):
1119
1155
  :param gift_cards: The optional gift card(s) to use for this transaction. At least one gift card is required if no other `payment_method` has been added. By default, only a maximum limit of 10 gift cards may be used in a single transaction. Please contact our team to change this limit.
1120
1156
  :param external_identifier: An external identifier that can be used to match the transaction against your own records.
1121
1157
  :param intent:
1122
- :param store: Whether or not to also try and store the payment method with us so that it can be used again for future use. This is only supported for payment methods that support this feature. There are also a few restrictions on how the flag may be set: * The flag has to be set to `true` when the `payment_source` is set to `recurring` or `installment`, and `merchant_initiated` is set to `false`. * The flag has to be set to `false` (or not set) when using a previously vaulted payment method.
1158
+ :param store: Whether or not to also try and store the payment method with us so that it can be used again for future use. This is only supported for payment methods that support this feature. There are also a few restrictions on how the flag may be set:
1159
+
1160
+ * The flag has to be set to `true` when the `payment_source` is set to `recurring` or `installment`, and `merchant_initiated` is set to `false`.
1161
+ * The flag has to be set to `false` (or not set) when using a previously vaulted payment method.
1123
1162
  :param three_d_secure_data: Pass through 3-D Secure data to support external 3-D Secure authorisation. If using an external 3-D Secure provider, you should not pass a `redirect_url` in the `payment_method` object for a transaction.
1124
1163
  :param metadata: Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it.
1125
- :param is_subsequent_payment: Indicates whether the transaction represents a subsequent payment coming from a setup recurring payment. Please note there are some restrictions on how this flag may be used. The flag can only be `false` (or not set) when the transaction meets one of the following criteria: * It is not `merchant_initiated`. * `payment_source` is set to `card_on_file`. The flag can only be set to `true` when the transaction meets one of the following criteria: * It is not `merchant_initiated`. * `payment_source` is set to `recurring` or `installment` and `merchant_initiated` is set to `true`. * `payment_source` is set to `card_on_file`.
1164
+ :param is_subsequent_payment: Indicates whether the transaction represents a subsequent payment coming from a setup recurring payment. Please note there are some restrictions on how this flag may be used.
1165
+
1166
+ The flag can only be `false` (or not set) when the transaction meets one of the following criteria:
1167
+
1168
+ * It is not `merchant_initiated`.
1169
+ * `payment_source` is set to `card_on_file`.
1170
+
1171
+ The flag can only be set to `true` when the transaction meets one of the following criteria:
1172
+ * It is not `merchant_initiated`.
1173
+ * `payment_source` is set to `recurring` or `installment` and `merchant_initiated` is set to `true`.
1174
+ * `payment_source` is set to `card_on_file`.
1126
1175
  :param merchant_initiated: Indicates whether the transaction was initiated by the merchant (true) or customer (false).
1127
1176
  :param payment_source: The way payment method information made it to this transaction.
1128
1177
  :param airline: The airline addendum data which describes the airline booking associated with this transaction.
@@ -1132,7 +1181,12 @@ class Transactions(BaseSDK):
1132
1181
  :param browser_info: Information about the browser used by the buyer. This can be used by anti-fraud services.
1133
1182
  :param shipping_details_id: The unique identifier of a set of shipping details stored for the buyer. If provided, the created transaction will include a copy of the details at the point of transaction creation; i.e. it will not be affected by later changes to the detail in the database.
1134
1183
  :param connection_options: Allows for passing optional configuration per connection to take advantage of connection specific features. When provided, the data is only passed to the target connection type to prevent sharing configuration across connections. Please note that each of the keys this object are in kebab-case, for example `cybersource-anti-fraud` as they represent the ID of the connector. All the other keys will be snake case, for example `merchant_defined_data` or camel case to match an external API that the connector uses.
1135
- :param async_capture: Whether to capture the transaction asynchronously. - When `async_capture` is `false` (default), the transaction is captured in the same request. - When `async_capture` is `true`, the transaction is automatically captured at a later time. Redirect transactions are not affected by this flag. This flag can only be set to `true` when `intent` is set to `capture`.
1184
+ :param async_capture: Whether to capture the transaction asynchronously.
1185
+
1186
+ - When `async_capture` is `false` (default), the transaction is captured in the same request.
1187
+ - When `async_capture` is `true`, the transaction is automatically captured at a later time.
1188
+
1189
+ Redirect transactions are not affected by this flag. This flag can only be set to `true` when `intent` is set to `capture`.
1136
1190
  :param anti_fraud_fingerprint: This field represents the fingerprint data to be passed to the active anti-fraud service.
1137
1191
  :param payment_service_id: The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped.
1138
1192
  :param account_funding_transaction: Marks the transaction as an AFT. Requires the payment service to support this feature, and might `recipient` and `buyer` data
@@ -1141,11 +1195,13 @@ class Transactions(BaseSDK):
1141
1195
  :param installment_count: The number of installments a buyer is required to make.
1142
1196
  :param tax_amount: The sales tax amount for this transaction, represented as a monetary amount in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`
1143
1197
  :param merchant_tax_id: Merchant tax ID (for example, EIN or VAT number).
1198
+ :param purchase_order_number: Invoice number or Purchase Order number.
1144
1199
  :param customer_reference_number: Customer code or reference.
1145
1200
  :param amount_includes_tax: Whether the tax is included in the amount.
1146
1201
  :param supplier_order_number: The merchant's unique identifier for the sales order or invoice.
1147
1202
  :param duty_amount: Total charges for import/export duties.
1148
1203
  :param shipping_amount: Total shipping amount.
1204
+ :param integration_client: Defines the client where the session for this transaction is going to be used. Please refer to the connections documentation for more guidance.
1149
1205
  :param retries: Override the default retry configuration for this method
1150
1206
  :param server_url: Override the default server URL for this method
1151
1207
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1174,7 +1230,7 @@ class Transactions(BaseSDK):
1174
1230
  OptionalNullable[models.TransactionCreatePaymentMethod],
1175
1231
  ),
1176
1232
  buyer=utils.get_pydantic_model(
1177
- buyer, OptionalNullable[models.GuestBuyerInput]
1233
+ buyer, OptionalNullable[models.GuestBuyer]
1178
1234
  ),
1179
1235
  buyer_id=buyer_id,
1180
1236
  buyer_external_identifier=buyer_external_identifier,
@@ -1220,11 +1276,13 @@ class Transactions(BaseSDK):
1220
1276
  installment_count=installment_count,
1221
1277
  tax_amount=tax_amount,
1222
1278
  merchant_tax_id=merchant_tax_id,
1279
+ purchase_order_number=purchase_order_number,
1223
1280
  customer_reference_number=customer_reference_number,
1224
1281
  amount_includes_tax=amount_includes_tax,
1225
1282
  supplier_order_number=supplier_order_number,
1226
1283
  duty_amount=duty_amount,
1227
1284
  shipping_amount=shipping_amount,
1285
+ integration_client=integration_client,
1228
1286
  ),
1229
1287
  )
1230
1288
 
@@ -1251,6 +1309,7 @@ class Transactions(BaseSDK):
1251
1309
  "json",
1252
1310
  models.TransactionCreate,
1253
1311
  ),
1312
+ allow_empty_value=None,
1254
1313
  timeout_ms=timeout_ms,
1255
1314
  )
1256
1315
 
@@ -1267,7 +1326,7 @@ class Transactions(BaseSDK):
1267
1326
  config=self.sdk_configuration,
1268
1327
  base_url=base_url or "",
1269
1328
  operation_id="create_transaction",
1270
- oauth2_scopes=[],
1329
+ oauth2_scopes=None,
1271
1330
  security_source=get_security_from_env(
1272
1331
  self.sdk_configuration.security, models.Security
1273
1332
  ),
@@ -1394,6 +1453,7 @@ class Transactions(BaseSDK):
1394
1453
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
1395
1454
  ),
1396
1455
  security=self.sdk_configuration.security,
1456
+ allow_empty_value=None,
1397
1457
  timeout_ms=timeout_ms,
1398
1458
  )
1399
1459
 
@@ -1414,7 +1474,7 @@ class Transactions(BaseSDK):
1414
1474
  config=self.sdk_configuration,
1415
1475
  base_url=base_url or "",
1416
1476
  operation_id="get_transaction",
1417
- oauth2_scopes=[],
1477
+ oauth2_scopes=None,
1418
1478
  security_source=get_security_from_env(
1419
1479
  self.sdk_configuration.security, models.Security
1420
1480
  ),
@@ -1541,6 +1601,7 @@ class Transactions(BaseSDK):
1541
1601
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
1542
1602
  ),
1543
1603
  security=self.sdk_configuration.security,
1604
+ allow_empty_value=None,
1544
1605
  timeout_ms=timeout_ms,
1545
1606
  )
1546
1607
 
@@ -1561,7 +1622,7 @@ class Transactions(BaseSDK):
1561
1622
  config=self.sdk_configuration,
1562
1623
  base_url=base_url or "",
1563
1624
  operation_id="get_transaction",
1564
- oauth2_scopes=[],
1625
+ oauth2_scopes=None,
1565
1626
  security_source=get_security_from_env(
1566
1627
  self.sdk_configuration.security, models.Security
1567
1628
  ),
@@ -1714,6 +1775,7 @@ class Transactions(BaseSDK):
1714
1775
  "json",
1715
1776
  models.TransactionUpdate,
1716
1777
  ),
1778
+ allow_empty_value=None,
1717
1779
  timeout_ms=timeout_ms,
1718
1780
  )
1719
1781
 
@@ -1730,7 +1792,7 @@ class Transactions(BaseSDK):
1730
1792
  config=self.sdk_configuration,
1731
1793
  base_url=base_url or "",
1732
1794
  operation_id="update_transaction",
1733
- oauth2_scopes=[],
1795
+ oauth2_scopes=None,
1734
1796
  security_source=get_security_from_env(
1735
1797
  self.sdk_configuration.security, models.Security
1736
1798
  ),
@@ -1883,6 +1945,7 @@ class Transactions(BaseSDK):
1883
1945
  "json",
1884
1946
  models.TransactionUpdate,
1885
1947
  ),
1948
+ allow_empty_value=None,
1886
1949
  timeout_ms=timeout_ms,
1887
1950
  )
1888
1951
 
@@ -1899,7 +1962,7 @@ class Transactions(BaseSDK):
1899
1962
  config=self.sdk_configuration,
1900
1963
  base_url=base_url or "",
1901
1964
  operation_id="update_transaction",
1902
- oauth2_scopes=[],
1965
+ oauth2_scopes=None,
1903
1966
  security_source=get_security_from_env(
1904
1967
  self.sdk_configuration.security, models.Security
1905
1968
  ),
@@ -2048,6 +2111,7 @@ class Transactions(BaseSDK):
2048
2111
  "json",
2049
2112
  models.TransactionCaptureCreate,
2050
2113
  ),
2114
+ allow_empty_value=None,
2051
2115
  timeout_ms=timeout_ms,
2052
2116
  )
2053
2117
 
@@ -2064,7 +2128,7 @@ class Transactions(BaseSDK):
2064
2128
  config=self.sdk_configuration,
2065
2129
  base_url=base_url or "",
2066
2130
  operation_id="capture_transaction",
2067
- oauth2_scopes=[],
2131
+ oauth2_scopes=None,
2068
2132
  security_source=get_security_from_env(
2069
2133
  self.sdk_configuration.security, models.Security
2070
2134
  ),
@@ -2213,6 +2277,7 @@ class Transactions(BaseSDK):
2213
2277
  "json",
2214
2278
  models.TransactionCaptureCreate,
2215
2279
  ),
2280
+ allow_empty_value=None,
2216
2281
  timeout_ms=timeout_ms,
2217
2282
  )
2218
2283
 
@@ -2229,7 +2294,7 @@ class Transactions(BaseSDK):
2229
2294
  config=self.sdk_configuration,
2230
2295
  base_url=base_url or "",
2231
2296
  operation_id="capture_transaction",
2232
- oauth2_scopes=[],
2297
+ oauth2_scopes=None,
2233
2298
  security_source=get_security_from_env(
2234
2299
  self.sdk_configuration.security, models.Security
2235
2300
  ),
@@ -2359,6 +2424,7 @@ class Transactions(BaseSDK):
2359
2424
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
2360
2425
  ),
2361
2426
  security=self.sdk_configuration.security,
2427
+ allow_empty_value=None,
2362
2428
  timeout_ms=timeout_ms,
2363
2429
  )
2364
2430
 
@@ -2375,7 +2441,7 @@ class Transactions(BaseSDK):
2375
2441
  config=self.sdk_configuration,
2376
2442
  base_url=base_url or "",
2377
2443
  operation_id="void_transaction",
2378
- oauth2_scopes=[],
2444
+ oauth2_scopes=None,
2379
2445
  security_source=get_security_from_env(
2380
2446
  self.sdk_configuration.security, models.Security
2381
2447
  ),
@@ -2505,6 +2571,7 @@ class Transactions(BaseSDK):
2505
2571
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
2506
2572
  ),
2507
2573
  security=self.sdk_configuration.security,
2574
+ allow_empty_value=None,
2508
2575
  timeout_ms=timeout_ms,
2509
2576
  )
2510
2577
 
@@ -2521,7 +2588,7 @@ class Transactions(BaseSDK):
2521
2588
  config=self.sdk_configuration,
2522
2589
  base_url=base_url or "",
2523
2590
  operation_id="void_transaction",
2524
- oauth2_scopes=[],
2591
+ oauth2_scopes=None,
2525
2592
  security_source=get_security_from_env(
2526
2593
  self.sdk_configuration.security, models.Security
2527
2594
  ),
@@ -2648,6 +2715,7 @@ class Transactions(BaseSDK):
2648
2715
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
2649
2716
  ),
2650
2717
  security=self.sdk_configuration.security,
2718
+ allow_empty_value=None,
2651
2719
  timeout_ms=timeout_ms,
2652
2720
  )
2653
2721
 
@@ -2664,7 +2732,7 @@ class Transactions(BaseSDK):
2664
2732
  config=self.sdk_configuration,
2665
2733
  base_url=base_url or "",
2666
2734
  operation_id="cancel_transaction",
2667
- oauth2_scopes=[],
2735
+ oauth2_scopes=None,
2668
2736
  security_source=get_security_from_env(
2669
2737
  self.sdk_configuration.security, models.Security
2670
2738
  ),
@@ -2791,6 +2859,7 @@ class Transactions(BaseSDK):
2791
2859
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
2792
2860
  ),
2793
2861
  security=self.sdk_configuration.security,
2862
+ allow_empty_value=None,
2794
2863
  timeout_ms=timeout_ms,
2795
2864
  )
2796
2865
 
@@ -2807,7 +2876,7 @@ class Transactions(BaseSDK):
2807
2876
  config=self.sdk_configuration,
2808
2877
  base_url=base_url or "",
2809
2878
  operation_id="cancel_transaction",
2810
- oauth2_scopes=[],
2879
+ oauth2_scopes=None,
2811
2880
  security_source=get_security_from_env(
2812
2881
  self.sdk_configuration.security, models.Security
2813
2882
  ),
@@ -2934,6 +3003,7 @@ class Transactions(BaseSDK):
2934
3003
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
2935
3004
  ),
2936
3005
  security=self.sdk_configuration.security,
3006
+ allow_empty_value=None,
2937
3007
  timeout_ms=timeout_ms,
2938
3008
  )
2939
3009
 
@@ -2950,7 +3020,7 @@ class Transactions(BaseSDK):
2950
3020
  config=self.sdk_configuration,
2951
3021
  base_url=base_url or "",
2952
3022
  operation_id="sync_transaction",
2953
- oauth2_scopes=[],
3023
+ oauth2_scopes=None,
2954
3024
  security_source=get_security_from_env(
2955
3025
  self.sdk_configuration.security, models.Security
2956
3026
  ),
@@ -3077,6 +3147,7 @@ class Transactions(BaseSDK):
3077
3147
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
3078
3148
  ),
3079
3149
  security=self.sdk_configuration.security,
3150
+ allow_empty_value=None,
3080
3151
  timeout_ms=timeout_ms,
3081
3152
  )
3082
3153
 
@@ -3093,7 +3164,7 @@ class Transactions(BaseSDK):
3093
3164
  config=self.sdk_configuration,
3094
3165
  base_url=base_url or "",
3095
3166
  operation_id="sync_transaction",
3096
- oauth2_scopes=[],
3167
+ oauth2_scopes=None,
3097
3168
  security_source=get_security_from_env(
3098
3169
  self.sdk_configuration.security, models.Security
3099
3170
  ),
@@ -76,6 +76,7 @@ class TransactionsRefunds(BaseSDK):
76
76
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
77
77
  ),
78
78
  security=self.sdk_configuration.security,
79
+ allow_empty_value=None,
79
80
  timeout_ms=timeout_ms,
80
81
  )
81
82
 
@@ -96,7 +97,7 @@ class TransactionsRefunds(BaseSDK):
96
97
  config=self.sdk_configuration,
97
98
  base_url=base_url or "",
98
99
  operation_id="list_transaction_refunds",
99
- oauth2_scopes=[],
100
+ oauth2_scopes=None,
100
101
  security_source=get_security_from_env(
101
102
  self.sdk_configuration.security, models.Security
102
103
  ),
@@ -223,6 +224,7 @@ class TransactionsRefunds(BaseSDK):
223
224
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
224
225
  ),
225
226
  security=self.sdk_configuration.security,
227
+ allow_empty_value=None,
226
228
  timeout_ms=timeout_ms,
227
229
  )
228
230
 
@@ -243,7 +245,7 @@ class TransactionsRefunds(BaseSDK):
243
245
  config=self.sdk_configuration,
244
246
  base_url=base_url or "",
245
247
  operation_id="list_transaction_refunds",
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
  ),
@@ -394,6 +396,7 @@ class TransactionsRefunds(BaseSDK):
394
396
  "json",
395
397
  models.TransactionRefundCreate,
396
398
  ),
399
+ allow_empty_value=None,
397
400
  timeout_ms=timeout_ms,
398
401
  )
399
402
 
@@ -410,7 +413,7 @@ class TransactionsRefunds(BaseSDK):
410
413
  config=self.sdk_configuration,
411
414
  base_url=base_url or "",
412
415
  operation_id="create_transaction_refund",
413
- oauth2_scopes=[],
416
+ oauth2_scopes=None,
414
417
  security_source=get_security_from_env(
415
418
  self.sdk_configuration.security, models.Security
416
419
  ),
@@ -561,6 +564,7 @@ class TransactionsRefunds(BaseSDK):
561
564
  "json",
562
565
  models.TransactionRefundCreate,
563
566
  ),
567
+ allow_empty_value=None,
564
568
  timeout_ms=timeout_ms,
565
569
  )
566
570
 
@@ -577,7 +581,7 @@ class TransactionsRefunds(BaseSDK):
577
581
  config=self.sdk_configuration,
578
582
  base_url=base_url or "",
579
583
  operation_id="create_transaction_refund",
580
- oauth2_scopes=[],
584
+ oauth2_scopes=None,
581
585
  security_source=get_security_from_env(
582
586
  self.sdk_configuration.security, models.Security
583
587
  ),
@@ -707,6 +711,7 @@ class TransactionsRefunds(BaseSDK):
707
711
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
708
712
  ),
709
713
  security=self.sdk_configuration.security,
714
+ allow_empty_value=None,
710
715
  timeout_ms=timeout_ms,
711
716
  )
712
717
 
@@ -727,7 +732,7 @@ class TransactionsRefunds(BaseSDK):
727
732
  config=self.sdk_configuration,
728
733
  base_url=base_url or "",
729
734
  operation_id="get_transaction_refund",
730
- oauth2_scopes=[],
735
+ oauth2_scopes=None,
731
736
  security_source=get_security_from_env(
732
737
  self.sdk_configuration.security, models.Security
733
738
  ),
@@ -857,6 +862,7 @@ class TransactionsRefunds(BaseSDK):
857
862
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
858
863
  ),
859
864
  security=self.sdk_configuration.security,
865
+ allow_empty_value=None,
860
866
  timeout_ms=timeout_ms,
861
867
  )
862
868
 
@@ -877,7 +883,7 @@ class TransactionsRefunds(BaseSDK):
877
883
  config=self.sdk_configuration,
878
884
  base_url=base_url or "",
879
885
  operation_id="get_transaction_refund",
880
- oauth2_scopes=[],
886
+ oauth2_scopes=None,
881
887
  security_source=get_security_from_env(
882
888
  self.sdk_configuration.security, models.Security
883
889
  ),