fragment-python 1.1.0__tar.gz → 1.2.0__tar.gz

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 (105) hide show
  1. {fragment_python-1.1.0 → fragment_python-1.2.0}/PKG-INFO +1 -1
  2. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/__init__.py +34 -0
  3. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/client.py +48 -0
  4. fragment_python-1.2.0/fragment/sdk/create_payment.py +40 -0
  5. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/enums.py +15 -1
  6. {fragment_python-1.1.0/fragment/sync_sdk → fragment_python-1.2.0/fragment/sdk}/input_types.py +112 -0
  7. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/std_queries/queries.graphql +34 -0
  8. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/__init__.py +34 -0
  9. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/client.py +48 -0
  10. fragment_python-1.2.0/fragment/sync_sdk/create_payment.py +40 -0
  11. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/enums.py +15 -1
  12. {fragment_python-1.1.0/fragment/sdk → fragment_python-1.2.0/fragment/sync_sdk}/input_types.py +112 -0
  13. {fragment_python-1.1.0 → fragment_python-1.2.0}/pyproject.toml +1 -1
  14. {fragment_python-1.1.0 → fragment_python-1.2.0}/LICENSE +0 -0
  15. {fragment_python-1.1.0 → fragment_python-1.2.0}/README.md +0 -0
  16. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/__init__.py +0 -0
  17. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/client/__init__.py +0 -0
  18. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/client/async_client.py +0 -0
  19. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/client/sync_client.py +0 -0
  20. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/codegen/__init__.py +0 -0
  21. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/codegen/helpers.py +0 -0
  22. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/codegen/main.py +0 -0
  23. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/codegen/plugins/__init__.py +0 -0
  24. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/codegen/plugins/generate_client_method.py +0 -0
  25. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/codegen/plugins/generate_typed_entries.py +0 -0
  26. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/codegen/plugins/get_file_comment.py +0 -0
  27. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/codegen/typed_entries.py +0 -0
  28. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/exceptions.py +0 -0
  29. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/logger.py +0 -0
  30. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/py.typed +0 -0
  31. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/add_ledger_entries.py +0 -0
  32. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/add_ledger_entry.py +0 -0
  33. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/add_ledger_entry_runtime.py +0 -0
  34. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/async_client.py +0 -0
  35. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/base_model.py +0 -0
  36. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/create_custom_currency.py +0 -0
  37. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/create_custom_link.py +0 -0
  38. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/create_ledger.py +0 -0
  39. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/delete_custom_txs.py +0 -0
  40. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/delete_ledger.py +0 -0
  41. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/delete_schema.py +0 -0
  42. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/get_account_data_migrations.py +0 -0
  43. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/get_entries_to_migrate_for_ledger_account_data_migration.py +0 -0
  44. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/get_entries_to_migrate_for_ledger_entry_data_migration.py +0 -0
  45. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/get_entry_data_migrations.py +0 -0
  46. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/get_ledger.py +0 -0
  47. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/get_ledger_account_balance.py +0 -0
  48. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/get_ledger_account_balance_with_child_rollup.py +0 -0
  49. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/get_ledger_account_lines.py +0 -0
  50. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/get_ledger_entry.py +0 -0
  51. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/get_schema.py +0 -0
  52. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/get_workspace.py +0 -0
  53. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/list_ledger_account_balances.py +0 -0
  54. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/list_ledger_accounts.py +0 -0
  55. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/list_ledger_entries.py +0 -0
  56. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/list_ledger_entry_group_balances.py +0 -0
  57. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/list_multi_currency_ledger_account_balances.py +0 -0
  58. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/migrate_ledger_entry.py +0 -0
  59. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/reconcile_tx.py +0 -0
  60. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/reconcile_tx_runtime.py +0 -0
  61. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/reverse_ledger_entry.py +0 -0
  62. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/store_schema.py +0 -0
  63. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/sync_custom_accounts.py +0 -0
  64. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/sync_custom_txs.py +0 -0
  65. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/typed_entries.py +0 -0
  66. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/update_ledger.py +0 -0
  67. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sdk/update_ledger_entry.py +0 -0
  68. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/add_ledger_entries.py +0 -0
  69. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/add_ledger_entry.py +0 -0
  70. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/add_ledger_entry_runtime.py +0 -0
  71. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/async_client.py +0 -0
  72. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/base_model.py +0 -0
  73. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/create_custom_currency.py +0 -0
  74. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/create_custom_link.py +0 -0
  75. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/create_ledger.py +0 -0
  76. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/delete_custom_txs.py +0 -0
  77. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/delete_ledger.py +0 -0
  78. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/delete_schema.py +0 -0
  79. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/get_account_data_migrations.py +0 -0
  80. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/get_entries_to_migrate_for_ledger_account_data_migration.py +0 -0
  81. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/get_entries_to_migrate_for_ledger_entry_data_migration.py +0 -0
  82. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/get_entry_data_migrations.py +0 -0
  83. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/get_ledger.py +0 -0
  84. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/get_ledger_account_balance.py +0 -0
  85. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/get_ledger_account_balance_with_child_rollup.py +0 -0
  86. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/get_ledger_account_lines.py +0 -0
  87. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/get_ledger_entry.py +0 -0
  88. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/get_schema.py +0 -0
  89. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/get_workspace.py +0 -0
  90. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/list_ledger_account_balances.py +0 -0
  91. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/list_ledger_accounts.py +0 -0
  92. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/list_ledger_entries.py +0 -0
  93. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/list_ledger_entry_group_balances.py +0 -0
  94. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/list_multi_currency_ledger_account_balances.py +0 -0
  95. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/migrate_ledger_entry.py +0 -0
  96. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/reconcile_tx.py +0 -0
  97. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/reconcile_tx_runtime.py +0 -0
  98. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/reverse_ledger_entry.py +0 -0
  99. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/store_schema.py +0 -0
  100. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/sync_client.py +0 -0
  101. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/sync_custom_accounts.py +0 -0
  102. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/sync_custom_txs.py +0 -0
  103. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/typed_entries.py +0 -0
  104. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/update_ledger.py +0 -0
  105. {fragment_python-1.1.0 → fragment_python-1.2.0}/fragment/sync_sdk/update_ledger_entry.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fragment-python
3
- Version: 1.1.0
3
+ Version: 1.2.0
4
4
  Summary: Python SDK for https://fragment.dev/
5
5
  License: Apache 2.0
6
6
  License-File: LICENSE
@@ -55,6 +55,12 @@ from .create_ledger import (
55
55
  CreateLedgerCreateLedgerCreateLedgerResultLedgerSchema,
56
56
  CreateLedgerCreateLedgerInternalError,
57
57
  )
58
+ from .create_payment import (
59
+ CreatePayment,
60
+ CreatePaymentCreatePaymentBadRequestError,
61
+ CreatePaymentCreatePaymentInternalError,
62
+ CreatePaymentCreatePaymentPayment,
63
+ )
58
64
  from .delete_custom_txs import (
59
65
  DeleteCustomTxs,
60
66
  DeleteCustomTxsDeleteCustomTxsBadRequestError,
@@ -97,6 +103,9 @@ from .enums import (
97
103
  SchemaConsistencyMode,
98
104
  SchemaLedgerAccountStatus,
99
105
  SchemaLedgerEntryStatus,
106
+ SchemaPaymentTypeDirection,
107
+ SchemaPaymentTypeStatus,
108
+ SchemaSystemLineKind,
100
109
  StripeEnv,
101
110
  TxType,
102
111
  UnitEnv,
@@ -181,6 +190,7 @@ from .input_types import (
181
190
  CreateLedgerAccountInput,
182
191
  CreateLedgerAccountsInput,
183
192
  CreateLedgerInput,
193
+ CreatePaymentInput,
184
194
  CurrencyFilter,
185
195
  CurrencyMatchInput,
186
196
  CustomAccountInput,
@@ -222,6 +232,7 @@ from .input_types import (
222
232
  LedgerLineInput,
223
233
  LedgerLineMatchInput,
224
234
  LedgerLinesFilterSet,
235
+ LedgerLineTagInput,
225
236
  LedgerMatchInput,
226
237
  LedgersFilterSet,
227
238
  LedgerTypeFilter,
@@ -245,7 +256,13 @@ from .input_types import (
245
256
  SchemaLedgerEntryTagInput,
246
257
  SchemaLedgerLineInput,
247
258
  SchemaMatchInput,
259
+ SchemaPaymentAccountingInput,
260
+ SchemaPaymentEntryInput,
248
261
  SchemaPaymentInput,
262
+ SchemaPaymentLineInput,
263
+ SchemaPaymentsInput,
264
+ SchemaPaymentTypeDetailsInput,
265
+ SchemaPaymentTypeInput,
249
266
  SchemaRepeatedConfigInput,
250
267
  SchemaTxMatchInput,
251
268
  StringFilter,
@@ -257,6 +274,7 @@ from .input_types import (
257
274
  UpdateLedgerAccountInput,
258
275
  UpdateLedgerEntryInput,
259
276
  UpdateLedgerInput,
277
+ UpdateLedgerLineInput,
260
278
  )
261
279
  from .list_ledger_account_balances import (
262
280
  ListLedgerAccountBalances,
@@ -451,6 +469,11 @@ __all__ = [
451
469
  "CreateLedgerCreateLedgerCreateLedgerResultLedgerSchema",
452
470
  "CreateLedgerCreateLedgerInternalError",
453
471
  "CreateLedgerInput",
472
+ "CreatePayment",
473
+ "CreatePaymentCreatePaymentBadRequestError",
474
+ "CreatePaymentCreatePaymentInternalError",
475
+ "CreatePaymentCreatePaymentPayment",
476
+ "CreatePaymentInput",
454
477
  "CurrencyCode",
455
478
  "CurrencyFilter",
456
479
  "CurrencyMatchInput",
@@ -577,6 +600,7 @@ __all__ = [
577
600
  "LedgerEntryTagInput",
578
601
  "LedgerLineInput",
579
602
  "LedgerLineMatchInput",
603
+ "LedgerLineTagInput",
580
604
  "LedgerLinesConsistencyMode",
581
605
  "LedgerLinesFilterSet",
582
606
  "LedgerMatchInput",
@@ -693,8 +717,17 @@ __all__ = [
693
717
  "SchemaLedgerEntryTagInput",
694
718
  "SchemaLedgerLineInput",
695
719
  "SchemaMatchInput",
720
+ "SchemaPaymentAccountingInput",
721
+ "SchemaPaymentEntryInput",
696
722
  "SchemaPaymentInput",
723
+ "SchemaPaymentLineInput",
724
+ "SchemaPaymentTypeDetailsInput",
725
+ "SchemaPaymentTypeDirection",
726
+ "SchemaPaymentTypeInput",
727
+ "SchemaPaymentTypeStatus",
728
+ "SchemaPaymentsInput",
697
729
  "SchemaRepeatedConfigInput",
730
+ "SchemaSystemLineKind",
698
731
  "SchemaTxMatchInput",
699
732
  "StoreSchema",
700
733
  "StoreSchemaStoreSchemaBadRequestError",
@@ -736,6 +769,7 @@ __all__ = [
736
769
  "UpdateLedgerEntryUpdateLedgerEntryUpdateLedgerEntryResultEntryLinesNodesAccount",
737
770
  "UpdateLedgerEntryUpdateLedgerEntryUpdateLedgerEntryResultEntryTags",
738
771
  "UpdateLedgerInput",
772
+ "UpdateLedgerLineInput",
739
773
  "UpdateLedgerUpdateLedgerBadRequestError",
740
774
  "UpdateLedgerUpdateLedgerInternalError",
741
775
  "UpdateLedgerUpdateLedgerUpdateLedgerResult",
@@ -10,6 +10,7 @@ from .async_client import AsyncFragmentClient
10
10
  from .create_custom_currency import CreateCustomCurrency
11
11
  from .create_custom_link import CreateCustomLink
12
12
  from .create_ledger import CreateLedger
13
+ from .create_payment import CreatePayment
13
14
  from .delete_custom_txs import DeleteCustomTxs
14
15
  from .delete_ledger import DeleteLedger
15
16
  from .delete_schema import DeleteSchema
@@ -1786,3 +1787,50 @@ class Client(AsyncFragmentClient):
1786
1787
  )
1787
1788
  data = self.get_data(response)
1788
1789
  return CreateCustomCurrency.model_validate(data)
1790
+
1791
+ async def create_payment(
1792
+ self,
1793
+ ik: Any,
1794
+ ledger_ik: Any,
1795
+ type_: Any,
1796
+ type_version: Optional[int] = None,
1797
+ parameters: Optional[Any] = None,
1798
+ **kwargs: Any
1799
+ ) -> CreatePayment:
1800
+ query = gql("""
1801
+ mutation createPayment($ik: SafeString!, $ledgerIk: SafeString!, $type: SafeString!, $typeVersion: Int, $parameters: JSON) {
1802
+ createPayment(
1803
+ ik: $ik
1804
+ ledger: {ik: $ledgerIk}
1805
+ payment: {type: $type, typeVersion: $typeVersion, parameters: $parameters}
1806
+ ) {
1807
+ __typename
1808
+ ... on Payment {
1809
+ clientSecret
1810
+ status
1811
+ }
1812
+ ... on BadRequestError {
1813
+ code
1814
+ message
1815
+ retryable
1816
+ }
1817
+ ... on InternalError {
1818
+ code
1819
+ message
1820
+ retryable
1821
+ }
1822
+ }
1823
+ }
1824
+ """)
1825
+ variables: dict[str, object] = {
1826
+ "ik": ik,
1827
+ "ledgerIk": ledger_ik,
1828
+ "type": type_,
1829
+ "typeVersion": type_version,
1830
+ "parameters": parameters,
1831
+ }
1832
+ response = await self.execute(
1833
+ query=query, operation_name="createPayment", variables=variables, **kwargs
1834
+ )
1835
+ data = self.get_data(response)
1836
+ return CreatePayment.model_validate(data)
@@ -0,0 +1,40 @@
1
+ # Generated by fragment (with the help of ariadne-codegen)
2
+ # Source: queries/
3
+
4
+ from typing import Literal, Union
5
+
6
+ from pydantic import Field
7
+
8
+ from .base_model import BaseModel
9
+ from .enums import PaymentStatus
10
+
11
+
12
+ class CreatePayment(BaseModel):
13
+ create_payment: Union[
14
+ "CreatePaymentCreatePaymentBadRequestError",
15
+ "CreatePaymentCreatePaymentInternalError",
16
+ "CreatePaymentCreatePaymentPayment",
17
+ ] = Field(alias="createPayment", discriminator="typename__")
18
+
19
+
20
+ class CreatePaymentCreatePaymentBadRequestError(BaseModel):
21
+ typename__: Literal["BadRequestError"] = Field(alias="__typename")
22
+ code: str
23
+ message: str
24
+ retryable: bool
25
+
26
+
27
+ class CreatePaymentCreatePaymentInternalError(BaseModel):
28
+ typename__: Literal["InternalError"] = Field(alias="__typename")
29
+ code: str
30
+ message: str
31
+ retryable: bool
32
+
33
+
34
+ class CreatePaymentCreatePaymentPayment(BaseModel):
35
+ typename__: Literal["Payment"] = Field(alias="__typename")
36
+ client_secret: str = Field(alias="clientSecret")
37
+ status: PaymentStatus
38
+
39
+
40
+ CreatePayment.model_rebuild()
@@ -261,8 +261,8 @@ class LinkType(str, Enum):
261
261
 
262
262
 
263
263
  class PaymentStatus(str, Enum):
264
+ needs_payment_method = "needs_payment_method"
264
265
  processing = "processing"
265
- requires_confirmation = "requires_confirmation"
266
266
  settled = "settled"
267
267
 
268
268
 
@@ -299,6 +299,20 @@ class SchemaLedgerEntryStatus(str, Enum):
299
299
  disabled = "disabled"
300
300
 
301
301
 
302
+ class SchemaPaymentTypeDirection(str, Enum):
303
+ payin = "payin"
304
+ payout = "payout"
305
+
306
+
307
+ class SchemaPaymentTypeStatus(str, Enum):
308
+ active = "active"
309
+
310
+
311
+ class SchemaSystemLineKind(str, Enum):
312
+ payment_fee_line = "payment_fee_line"
313
+ payment_settlement_line = "payment_settlement_line"
314
+
315
+
302
316
  class StripeEnv(str, Enum):
303
317
  livemode = "livemode"
304
318
  testmode = "testmode"
@@ -21,6 +21,9 @@ from .enums import (
21
21
  SchemaConsistencyMode,
22
22
  SchemaLedgerAccountStatus,
23
23
  SchemaLedgerEntryStatus,
24
+ SchemaPaymentTypeDirection,
25
+ SchemaPaymentTypeStatus,
26
+ SchemaSystemLineKind,
24
27
  TxType,
25
28
  )
26
29
 
@@ -117,6 +120,17 @@ class CreateLedgerInput(BaseModel):
117
120
  type_: Optional[LedgerTypes] = Field(alias="type", default=None)
118
121
 
119
122
 
123
+ class CreatePaymentInput(BaseModel):
124
+ """EXPERIMENTAL: The Payment to create."""
125
+
126
+ parameters: Optional[Any] = None
127
+ "Parameters for the specific Payment Type. Must be a key-value pair of strings. Must be a flat object: nested objects and arrays are rejected."
128
+ type_: Any = Field(alias="type")
129
+ "The type of the Payment. Must be defined in the Schema linked to the Ledger."
130
+ type_version: Optional[int] = Field(alias="typeVersion", default=None)
131
+ "The version of the Payment Type. Defaults to the latest active version."
132
+
133
+
120
134
  class CurrencyFilter(BaseModel):
121
135
  equal_to: Optional["CurrencyMatchInput"] = Field(alias="equalTo", default=None)
122
136
  "Must match the value provided"
@@ -576,6 +590,13 @@ class LedgerLineMatchInput(BaseModel):
576
590
  "The FRAGMENT ID of the ledger line"
577
591
 
578
592
 
593
+ class LedgerLineTagInput(BaseModel):
594
+ key: Any
595
+ "The key of this tag. Can be up to 128 characters long."
596
+ value: Any
597
+ "The value associated with this tag's key. Can be up to 128 characters long."
598
+
599
+
579
600
  class LedgerLinesFilterSet(BaseModel):
580
601
  created: Optional["DateTimeFilter"] = None
581
602
  "Filter by the created timestamp of the Ledger Line. This is the wall-clock time when the Ledger Line was created."
@@ -726,6 +747,8 @@ class SchemaInput(BaseModel):
726
747
  "The Ledger Entries to add to the Schema."
727
748
  name: Optional[Any] = None
728
749
  "The human-readable name of the Schema."
750
+ payments: Optional["SchemaPaymentsInput"] = None
751
+ "EXPERIMENTAL: The Payment Types to add to the Schema."
729
752
  scenes: Optional[list["SceneInput"]] = None
730
753
  "Any scenes associated with this Schema."
731
754
 
@@ -879,12 +902,80 @@ class SchemaMatchInput(BaseModel):
879
902
  "Optional parameter to specify version of requested Schema. If not provided, it defaults to 0, representing the latest available version for the provided Schema key."
880
903
 
881
904
 
905
+ class SchemaPaymentAccountingInput(BaseModel):
906
+ """EXPERIMENTAL: The Ledger Entries a Payment Type posts as a payment moves
907
+ through its lifecycle, keyed by lifecycle transition."""
908
+
909
+ needs_payment_method_to_processing: Optional["SchemaPaymentEntryInput"] = None
910
+ "Posted when the payment enters processing. Optional."
911
+ processing_to_settled: "SchemaPaymentEntryInput"
912
+ "Posted when the payment settles. Every Payment Type must define it."
913
+
914
+
915
+ class SchemaPaymentEntryInput(BaseModel):
916
+ """EXPERIMENTAL: The Ledger Entry a Payment Type posts on a payment lifecycle event."""
917
+
918
+ description: Optional[Any] = None
919
+ "Human-readable description of the payment entry."
920
+ lines: list["SchemaPaymentLineInput"]
921
+ "The Ledger Lines in the payment entry."
922
+
923
+
882
924
  class SchemaPaymentInput(BaseModel):
883
925
  """EXPERIMENTAL: Marks a Ledger Account as a Payment Account."""
884
926
 
885
927
  penguin: bool
886
928
 
887
929
 
930
+ class SchemaPaymentLineInput(BaseModel):
931
+ """EXPERIMENTAL: A Ledger Line in a payment entry."""
932
+
933
+ account: "SchemaLedgerAccountMatchInput"
934
+ "The Ledger Account this line will be posted to.\nIt supports parameters in its attributes via handlebars syntax."
935
+ amount: Any
936
+ "The amount of the line. It supports parameters via the handlebars syntax and addition (+) and subtraction (-)."
937
+ currency: Optional["SchemaCurrencyMatchInput"] = None
938
+ "The currency of the line. This is required if the Ledger Account has currencyMode multi.\nIt supports parameters in its attributes via handlebars syntax."
939
+ description: Optional[Any] = None
940
+ "Human-readable description of the line."
941
+ key: Any
942
+ "The key for the line. Keys must be unique within a payment entry."
943
+ system: Optional[SchemaSystemLineKind] = None
944
+ "Marks this as a system-owned line. Fragment fills the amounts of system\nlines when the payment entry is posted."
945
+
946
+
947
+ class SchemaPaymentTypeDetailsInput(BaseModel):
948
+ """EXPERIMENTAL: The payment a Payment Type creates."""
949
+
950
+ amount: Any
951
+ "The amount requested for the payment, as a parameterized expression filled\nfrom createPayment parameters."
952
+ direction: SchemaPaymentTypeDirection
953
+ "The direction the payment moves money."
954
+
955
+
956
+ class SchemaPaymentTypeInput(BaseModel):
957
+ """EXPERIMENTAL: A Payment Type in a Schema. All Payment Types defined in a
958
+ Schema must have a unique `type` and `typeVersion` pair."""
959
+
960
+ accounting: "SchemaPaymentAccountingInput"
961
+ "The Ledger Entries posted as the payment moves through its lifecycle."
962
+ payment: "SchemaPaymentTypeDetailsInput"
963
+ "The payment this Payment Type creates."
964
+ status: SchemaPaymentTypeStatus
965
+ "The status of this Payment Type."
966
+ type_: Any = Field(alias="type")
967
+ "The type of this Payment Type. This is a stable, unique identifier for it.\nUniqueness is enforced at the Schema level."
968
+ type_version: int = Field(alias="typeVersion")
969
+ "The version of the Payment Type."
970
+
971
+
972
+ class SchemaPaymentsInput(BaseModel):
973
+ """EXPERIMENTAL: The Payment Types in your Schema."""
974
+
975
+ types: list["SchemaPaymentTypeInput"]
976
+ "A list of Payment Type definitions."
977
+
978
+
888
979
  class SchemaRepeatedConfigInput(BaseModel):
889
980
  """Configuration for repeated expansion of a line or condition. The key names a client-supplied
890
981
  array parameter whose elements each generate one copy of the line or condition at runtime.
@@ -995,6 +1086,10 @@ class UpdateLedgerAccountInput(BaseModel):
995
1086
  class UpdateLedgerEntryInput(BaseModel):
996
1087
  groups: Optional[list["LedgerEntryGroupInput"]] = None
997
1088
  "The list of Groups to add to this Ledger Entry."
1089
+ ledger_lines: Optional[list["UpdateLedgerLineInput"]] = Field(
1090
+ alias="ledgerLines", default=None
1091
+ )
1092
+ "The list of Ledger Line updates to apply to Ledger Lines on this Ledger Entry."
998
1093
  tags: Optional[list["LedgerEntryTagInput"]] = None
999
1094
  "The list of Tags to add and/or update on this Ledger Entry."
1000
1095
  tags_to_remove: Optional[list["LedgerEntryTagInput"]] = Field(
@@ -1008,6 +1103,17 @@ class UpdateLedgerInput(BaseModel):
1008
1103
  "The new Ledger name. "
1009
1104
 
1010
1105
 
1106
+ class UpdateLedgerLineInput(BaseModel):
1107
+ ledger_line: "LedgerLineMatchInput" = Field(alias="ledgerLine")
1108
+ "The Ledger Line that is being updated. It must belong to the Ledger Entry being updated."
1109
+ tags: Optional[list["LedgerLineTagInput"]] = None
1110
+ "The list of Tags to add and/or update on this Ledger Line."
1111
+ tags_to_remove: Optional[list["LedgerLineTagInput"]] = Field(
1112
+ alias="tagsToRemove", default=None
1113
+ )
1114
+ "The list of Tags to remove from this Ledger Line."
1115
+
1116
+
1011
1117
  AddLedgerEntryInput.model_rebuild()
1012
1118
  ChartOfAccountsInput.model_rebuild()
1013
1119
  CreateLedgerAccountInput.model_rebuild()
@@ -1049,6 +1155,12 @@ SchemaLedgerEntriesInput.model_rebuild()
1049
1155
  SchemaLedgerEntryConditionInput.model_rebuild()
1050
1156
  SchemaLedgerEntryInput.model_rebuild()
1051
1157
  SchemaLedgerLineInput.model_rebuild()
1158
+ SchemaPaymentAccountingInput.model_rebuild()
1159
+ SchemaPaymentEntryInput.model_rebuild()
1160
+ SchemaPaymentLineInput.model_rebuild()
1161
+ SchemaPaymentTypeInput.model_rebuild()
1162
+ SchemaPaymentsInput.model_rebuild()
1052
1163
  TagFilter.model_rebuild()
1053
1164
  UpdateLedgerAccountInput.model_rebuild()
1054
1165
  UpdateLedgerEntryInput.model_rebuild()
1166
+ UpdateLedgerLineInput.model_rebuild()
@@ -1241,3 +1241,37 @@ mutation createCustomCurrency(
1241
1241
  }
1242
1242
  }
1243
1243
  }
1244
+
1245
+ mutation createPayment(
1246
+ $ik: SafeString!
1247
+ $ledgerIk: SafeString!
1248
+ $type: SafeString!
1249
+ $typeVersion: Int
1250
+ $parameters: JSON
1251
+ ) {
1252
+ createPayment(
1253
+ ik: $ik
1254
+ ledger: { ik: $ledgerIk }
1255
+ payment: {
1256
+ type: $type
1257
+ typeVersion: $typeVersion
1258
+ parameters: $parameters
1259
+ }
1260
+ ) {
1261
+ __typename
1262
+ ... on Payment {
1263
+ clientSecret
1264
+ status
1265
+ }
1266
+ ... on BadRequestError {
1267
+ code
1268
+ message
1269
+ retryable
1270
+ }
1271
+ ... on InternalError {
1272
+ code
1273
+ message
1274
+ retryable
1275
+ }
1276
+ }
1277
+ }
@@ -54,6 +54,12 @@ from .create_ledger import (
54
54
  CreateLedgerCreateLedgerCreateLedgerResultLedgerSchema,
55
55
  CreateLedgerCreateLedgerInternalError,
56
56
  )
57
+ from .create_payment import (
58
+ CreatePayment,
59
+ CreatePaymentCreatePaymentBadRequestError,
60
+ CreatePaymentCreatePaymentInternalError,
61
+ CreatePaymentCreatePaymentPayment,
62
+ )
57
63
  from .delete_custom_txs import (
58
64
  DeleteCustomTxs,
59
65
  DeleteCustomTxsDeleteCustomTxsBadRequestError,
@@ -96,6 +102,9 @@ from .enums import (
96
102
  SchemaConsistencyMode,
97
103
  SchemaLedgerAccountStatus,
98
104
  SchemaLedgerEntryStatus,
105
+ SchemaPaymentTypeDirection,
106
+ SchemaPaymentTypeStatus,
107
+ SchemaSystemLineKind,
99
108
  StripeEnv,
100
109
  TxType,
101
110
  UnitEnv,
@@ -180,6 +189,7 @@ from .input_types import (
180
189
  CreateLedgerAccountInput,
181
190
  CreateLedgerAccountsInput,
182
191
  CreateLedgerInput,
192
+ CreatePaymentInput,
183
193
  CurrencyFilter,
184
194
  CurrencyMatchInput,
185
195
  CustomAccountInput,
@@ -221,6 +231,7 @@ from .input_types import (
221
231
  LedgerLineInput,
222
232
  LedgerLineMatchInput,
223
233
  LedgerLinesFilterSet,
234
+ LedgerLineTagInput,
224
235
  LedgerMatchInput,
225
236
  LedgersFilterSet,
226
237
  LedgerTypeFilter,
@@ -244,7 +255,13 @@ from .input_types import (
244
255
  SchemaLedgerEntryTagInput,
245
256
  SchemaLedgerLineInput,
246
257
  SchemaMatchInput,
258
+ SchemaPaymentAccountingInput,
259
+ SchemaPaymentEntryInput,
247
260
  SchemaPaymentInput,
261
+ SchemaPaymentLineInput,
262
+ SchemaPaymentsInput,
263
+ SchemaPaymentTypeDetailsInput,
264
+ SchemaPaymentTypeInput,
248
265
  SchemaRepeatedConfigInput,
249
266
  SchemaTxMatchInput,
250
267
  StringFilter,
@@ -256,6 +273,7 @@ from .input_types import (
256
273
  UpdateLedgerAccountInput,
257
274
  UpdateLedgerEntryInput,
258
275
  UpdateLedgerInput,
276
+ UpdateLedgerLineInput,
259
277
  )
260
278
  from .list_ledger_account_balances import (
261
279
  ListLedgerAccountBalances,
@@ -450,6 +468,11 @@ __all__ = [
450
468
  "CreateLedgerCreateLedgerCreateLedgerResultLedgerSchema",
451
469
  "CreateLedgerCreateLedgerInternalError",
452
470
  "CreateLedgerInput",
471
+ "CreatePayment",
472
+ "CreatePaymentCreatePaymentBadRequestError",
473
+ "CreatePaymentCreatePaymentInternalError",
474
+ "CreatePaymentCreatePaymentPayment",
475
+ "CreatePaymentInput",
453
476
  "CurrencyCode",
454
477
  "CurrencyFilter",
455
478
  "CurrencyMatchInput",
@@ -576,6 +599,7 @@ __all__ = [
576
599
  "LedgerEntryTagInput",
577
600
  "LedgerLineInput",
578
601
  "LedgerLineMatchInput",
602
+ "LedgerLineTagInput",
579
603
  "LedgerLinesConsistencyMode",
580
604
  "LedgerLinesFilterSet",
581
605
  "LedgerMatchInput",
@@ -692,8 +716,17 @@ __all__ = [
692
716
  "SchemaLedgerEntryTagInput",
693
717
  "SchemaLedgerLineInput",
694
718
  "SchemaMatchInput",
719
+ "SchemaPaymentAccountingInput",
720
+ "SchemaPaymentEntryInput",
695
721
  "SchemaPaymentInput",
722
+ "SchemaPaymentLineInput",
723
+ "SchemaPaymentTypeDetailsInput",
724
+ "SchemaPaymentTypeDirection",
725
+ "SchemaPaymentTypeInput",
726
+ "SchemaPaymentTypeStatus",
727
+ "SchemaPaymentsInput",
696
728
  "SchemaRepeatedConfigInput",
729
+ "SchemaSystemLineKind",
697
730
  "SchemaTxMatchInput",
698
731
  "StoreSchema",
699
732
  "StoreSchemaStoreSchemaBadRequestError",
@@ -736,6 +769,7 @@ __all__ = [
736
769
  "UpdateLedgerEntryUpdateLedgerEntryUpdateLedgerEntryResultEntryLinesNodesAccount",
737
770
  "UpdateLedgerEntryUpdateLedgerEntryUpdateLedgerEntryResultEntryTags",
738
771
  "UpdateLedgerInput",
772
+ "UpdateLedgerLineInput",
739
773
  "UpdateLedgerUpdateLedgerBadRequestError",
740
774
  "UpdateLedgerUpdateLedgerInternalError",
741
775
  "UpdateLedgerUpdateLedgerUpdateLedgerResult",
@@ -9,6 +9,7 @@ from .add_ledger_entry_runtime import AddLedgerEntryRuntime
9
9
  from .create_custom_currency import CreateCustomCurrency
10
10
  from .create_custom_link import CreateCustomLink
11
11
  from .create_ledger import CreateLedger
12
+ from .create_payment import CreatePayment
12
13
  from .delete_custom_txs import DeleteCustomTxs
13
14
  from .delete_ledger import DeleteLedger
14
15
  from .delete_schema import DeleteSchema
@@ -1780,3 +1781,50 @@ class Client(SyncFragmentClient):
1780
1781
  )
1781
1782
  data = self.get_data(response)
1782
1783
  return CreateCustomCurrency.model_validate(data)
1784
+
1785
+ def create_payment(
1786
+ self,
1787
+ ik: Any,
1788
+ ledger_ik: Any,
1789
+ type_: Any,
1790
+ type_version: Optional[int] = None,
1791
+ parameters: Optional[Any] = None,
1792
+ **kwargs: Any
1793
+ ) -> CreatePayment:
1794
+ query = gql("""
1795
+ mutation createPayment($ik: SafeString!, $ledgerIk: SafeString!, $type: SafeString!, $typeVersion: Int, $parameters: JSON) {
1796
+ createPayment(
1797
+ ik: $ik
1798
+ ledger: {ik: $ledgerIk}
1799
+ payment: {type: $type, typeVersion: $typeVersion, parameters: $parameters}
1800
+ ) {
1801
+ __typename
1802
+ ... on Payment {
1803
+ clientSecret
1804
+ status
1805
+ }
1806
+ ... on BadRequestError {
1807
+ code
1808
+ message
1809
+ retryable
1810
+ }
1811
+ ... on InternalError {
1812
+ code
1813
+ message
1814
+ retryable
1815
+ }
1816
+ }
1817
+ }
1818
+ """)
1819
+ variables: dict[str, object] = {
1820
+ "ik": ik,
1821
+ "ledgerIk": ledger_ik,
1822
+ "type": type_,
1823
+ "typeVersion": type_version,
1824
+ "parameters": parameters,
1825
+ }
1826
+ response = self.execute(
1827
+ query=query, operation_name="createPayment", variables=variables, **kwargs
1828
+ )
1829
+ data = self.get_data(response)
1830
+ return CreatePayment.model_validate(data)
@@ -0,0 +1,40 @@
1
+ # Generated by fragment (with the help of ariadne-codegen)
2
+ # Source: queries/
3
+
4
+ from typing import Literal, Union
5
+
6
+ from pydantic import Field
7
+
8
+ from .base_model import BaseModel
9
+ from .enums import PaymentStatus
10
+
11
+
12
+ class CreatePayment(BaseModel):
13
+ create_payment: Union[
14
+ "CreatePaymentCreatePaymentBadRequestError",
15
+ "CreatePaymentCreatePaymentInternalError",
16
+ "CreatePaymentCreatePaymentPayment",
17
+ ] = Field(alias="createPayment", discriminator="typename__")
18
+
19
+
20
+ class CreatePaymentCreatePaymentBadRequestError(BaseModel):
21
+ typename__: Literal["BadRequestError"] = Field(alias="__typename")
22
+ code: str
23
+ message: str
24
+ retryable: bool
25
+
26
+
27
+ class CreatePaymentCreatePaymentInternalError(BaseModel):
28
+ typename__: Literal["InternalError"] = Field(alias="__typename")
29
+ code: str
30
+ message: str
31
+ retryable: bool
32
+
33
+
34
+ class CreatePaymentCreatePaymentPayment(BaseModel):
35
+ typename__: Literal["Payment"] = Field(alias="__typename")
36
+ client_secret: str = Field(alias="clientSecret")
37
+ status: PaymentStatus
38
+
39
+
40
+ CreatePayment.model_rebuild()
@@ -261,8 +261,8 @@ class LinkType(str, Enum):
261
261
 
262
262
 
263
263
  class PaymentStatus(str, Enum):
264
+ needs_payment_method = "needs_payment_method"
264
265
  processing = "processing"
265
- requires_confirmation = "requires_confirmation"
266
266
  settled = "settled"
267
267
 
268
268
 
@@ -299,6 +299,20 @@ class SchemaLedgerEntryStatus(str, Enum):
299
299
  disabled = "disabled"
300
300
 
301
301
 
302
+ class SchemaPaymentTypeDirection(str, Enum):
303
+ payin = "payin"
304
+ payout = "payout"
305
+
306
+
307
+ class SchemaPaymentTypeStatus(str, Enum):
308
+ active = "active"
309
+
310
+
311
+ class SchemaSystemLineKind(str, Enum):
312
+ payment_fee_line = "payment_fee_line"
313
+ payment_settlement_line = "payment_settlement_line"
314
+
315
+
302
316
  class StripeEnv(str, Enum):
303
317
  livemode = "livemode"
304
318
  testmode = "testmode"
@@ -21,6 +21,9 @@ from .enums import (
21
21
  SchemaConsistencyMode,
22
22
  SchemaLedgerAccountStatus,
23
23
  SchemaLedgerEntryStatus,
24
+ SchemaPaymentTypeDirection,
25
+ SchemaPaymentTypeStatus,
26
+ SchemaSystemLineKind,
24
27
  TxType,
25
28
  )
26
29
 
@@ -117,6 +120,17 @@ class CreateLedgerInput(BaseModel):
117
120
  type_: Optional[LedgerTypes] = Field(alias="type", default=None)
118
121
 
119
122
 
123
+ class CreatePaymentInput(BaseModel):
124
+ """EXPERIMENTAL: The Payment to create."""
125
+
126
+ parameters: Optional[Any] = None
127
+ "Parameters for the specific Payment Type. Must be a key-value pair of strings. Must be a flat object: nested objects and arrays are rejected."
128
+ type_: Any = Field(alias="type")
129
+ "The type of the Payment. Must be defined in the Schema linked to the Ledger."
130
+ type_version: Optional[int] = Field(alias="typeVersion", default=None)
131
+ "The version of the Payment Type. Defaults to the latest active version."
132
+
133
+
120
134
  class CurrencyFilter(BaseModel):
121
135
  equal_to: Optional["CurrencyMatchInput"] = Field(alias="equalTo", default=None)
122
136
  "Must match the value provided"
@@ -576,6 +590,13 @@ class LedgerLineMatchInput(BaseModel):
576
590
  "The FRAGMENT ID of the ledger line"
577
591
 
578
592
 
593
+ class LedgerLineTagInput(BaseModel):
594
+ key: Any
595
+ "The key of this tag. Can be up to 128 characters long."
596
+ value: Any
597
+ "The value associated with this tag's key. Can be up to 128 characters long."
598
+
599
+
579
600
  class LedgerLinesFilterSet(BaseModel):
580
601
  created: Optional["DateTimeFilter"] = None
581
602
  "Filter by the created timestamp of the Ledger Line. This is the wall-clock time when the Ledger Line was created."
@@ -726,6 +747,8 @@ class SchemaInput(BaseModel):
726
747
  "The Ledger Entries to add to the Schema."
727
748
  name: Optional[Any] = None
728
749
  "The human-readable name of the Schema."
750
+ payments: Optional["SchemaPaymentsInput"] = None
751
+ "EXPERIMENTAL: The Payment Types to add to the Schema."
729
752
  scenes: Optional[list["SceneInput"]] = None
730
753
  "Any scenes associated with this Schema."
731
754
 
@@ -879,12 +902,80 @@ class SchemaMatchInput(BaseModel):
879
902
  "Optional parameter to specify version of requested Schema. If not provided, it defaults to 0, representing the latest available version for the provided Schema key."
880
903
 
881
904
 
905
+ class SchemaPaymentAccountingInput(BaseModel):
906
+ """EXPERIMENTAL: The Ledger Entries a Payment Type posts as a payment moves
907
+ through its lifecycle, keyed by lifecycle transition."""
908
+
909
+ needs_payment_method_to_processing: Optional["SchemaPaymentEntryInput"] = None
910
+ "Posted when the payment enters processing. Optional."
911
+ processing_to_settled: "SchemaPaymentEntryInput"
912
+ "Posted when the payment settles. Every Payment Type must define it."
913
+
914
+
915
+ class SchemaPaymentEntryInput(BaseModel):
916
+ """EXPERIMENTAL: The Ledger Entry a Payment Type posts on a payment lifecycle event."""
917
+
918
+ description: Optional[Any] = None
919
+ "Human-readable description of the payment entry."
920
+ lines: list["SchemaPaymentLineInput"]
921
+ "The Ledger Lines in the payment entry."
922
+
923
+
882
924
  class SchemaPaymentInput(BaseModel):
883
925
  """EXPERIMENTAL: Marks a Ledger Account as a Payment Account."""
884
926
 
885
927
  penguin: bool
886
928
 
887
929
 
930
+ class SchemaPaymentLineInput(BaseModel):
931
+ """EXPERIMENTAL: A Ledger Line in a payment entry."""
932
+
933
+ account: "SchemaLedgerAccountMatchInput"
934
+ "The Ledger Account this line will be posted to.\nIt supports parameters in its attributes via handlebars syntax."
935
+ amount: Any
936
+ "The amount of the line. It supports parameters via the handlebars syntax and addition (+) and subtraction (-)."
937
+ currency: Optional["SchemaCurrencyMatchInput"] = None
938
+ "The currency of the line. This is required if the Ledger Account has currencyMode multi.\nIt supports parameters in its attributes via handlebars syntax."
939
+ description: Optional[Any] = None
940
+ "Human-readable description of the line."
941
+ key: Any
942
+ "The key for the line. Keys must be unique within a payment entry."
943
+ system: Optional[SchemaSystemLineKind] = None
944
+ "Marks this as a system-owned line. Fragment fills the amounts of system\nlines when the payment entry is posted."
945
+
946
+
947
+ class SchemaPaymentTypeDetailsInput(BaseModel):
948
+ """EXPERIMENTAL: The payment a Payment Type creates."""
949
+
950
+ amount: Any
951
+ "The amount requested for the payment, as a parameterized expression filled\nfrom createPayment parameters."
952
+ direction: SchemaPaymentTypeDirection
953
+ "The direction the payment moves money."
954
+
955
+
956
+ class SchemaPaymentTypeInput(BaseModel):
957
+ """EXPERIMENTAL: A Payment Type in a Schema. All Payment Types defined in a
958
+ Schema must have a unique `type` and `typeVersion` pair."""
959
+
960
+ accounting: "SchemaPaymentAccountingInput"
961
+ "The Ledger Entries posted as the payment moves through its lifecycle."
962
+ payment: "SchemaPaymentTypeDetailsInput"
963
+ "The payment this Payment Type creates."
964
+ status: SchemaPaymentTypeStatus
965
+ "The status of this Payment Type."
966
+ type_: Any = Field(alias="type")
967
+ "The type of this Payment Type. This is a stable, unique identifier for it.\nUniqueness is enforced at the Schema level."
968
+ type_version: int = Field(alias="typeVersion")
969
+ "The version of the Payment Type."
970
+
971
+
972
+ class SchemaPaymentsInput(BaseModel):
973
+ """EXPERIMENTAL: The Payment Types in your Schema."""
974
+
975
+ types: list["SchemaPaymentTypeInput"]
976
+ "A list of Payment Type definitions."
977
+
978
+
888
979
  class SchemaRepeatedConfigInput(BaseModel):
889
980
  """Configuration for repeated expansion of a line or condition. The key names a client-supplied
890
981
  array parameter whose elements each generate one copy of the line or condition at runtime.
@@ -995,6 +1086,10 @@ class UpdateLedgerAccountInput(BaseModel):
995
1086
  class UpdateLedgerEntryInput(BaseModel):
996
1087
  groups: Optional[list["LedgerEntryGroupInput"]] = None
997
1088
  "The list of Groups to add to this Ledger Entry."
1089
+ ledger_lines: Optional[list["UpdateLedgerLineInput"]] = Field(
1090
+ alias="ledgerLines", default=None
1091
+ )
1092
+ "The list of Ledger Line updates to apply to Ledger Lines on this Ledger Entry."
998
1093
  tags: Optional[list["LedgerEntryTagInput"]] = None
999
1094
  "The list of Tags to add and/or update on this Ledger Entry."
1000
1095
  tags_to_remove: Optional[list["LedgerEntryTagInput"]] = Field(
@@ -1008,6 +1103,17 @@ class UpdateLedgerInput(BaseModel):
1008
1103
  "The new Ledger name. "
1009
1104
 
1010
1105
 
1106
+ class UpdateLedgerLineInput(BaseModel):
1107
+ ledger_line: "LedgerLineMatchInput" = Field(alias="ledgerLine")
1108
+ "The Ledger Line that is being updated. It must belong to the Ledger Entry being updated."
1109
+ tags: Optional[list["LedgerLineTagInput"]] = None
1110
+ "The list of Tags to add and/or update on this Ledger Line."
1111
+ tags_to_remove: Optional[list["LedgerLineTagInput"]] = Field(
1112
+ alias="tagsToRemove", default=None
1113
+ )
1114
+ "The list of Tags to remove from this Ledger Line."
1115
+
1116
+
1011
1117
  AddLedgerEntryInput.model_rebuild()
1012
1118
  ChartOfAccountsInput.model_rebuild()
1013
1119
  CreateLedgerAccountInput.model_rebuild()
@@ -1049,6 +1155,12 @@ SchemaLedgerEntriesInput.model_rebuild()
1049
1155
  SchemaLedgerEntryConditionInput.model_rebuild()
1050
1156
  SchemaLedgerEntryInput.model_rebuild()
1051
1157
  SchemaLedgerLineInput.model_rebuild()
1158
+ SchemaPaymentAccountingInput.model_rebuild()
1159
+ SchemaPaymentEntryInput.model_rebuild()
1160
+ SchemaPaymentLineInput.model_rebuild()
1161
+ SchemaPaymentTypeInput.model_rebuild()
1162
+ SchemaPaymentsInput.model_rebuild()
1052
1163
  TagFilter.model_rebuild()
1053
1164
  UpdateLedgerAccountInput.model_rebuild()
1054
1165
  UpdateLedgerEntryInput.model_rebuild()
1166
+ UpdateLedgerLineInput.model_rebuild()
@@ -5,7 +5,7 @@ target_package_name = "fragment_graphql_client"
5
5
 
6
6
  [tool.poetry]
7
7
  name = "fragment-python"
8
- version = "1.1.0"
8
+ version = "1.2.0"
9
9
  description = "Python SDK for https://fragment.dev/"
10
10
  authors = ["Fragment Foundries Inc"]
11
11
  license = "Apache 2.0"
File without changes