fragment-python 1.1.1__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.
- {fragment_python-1.1.1 → fragment_python-1.2.0}/PKG-INFO +1 -1
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/__init__.py +14 -2
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/client.py +48 -0
- fragment_python-1.2.0/fragment/sdk/create_payment.py +40 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/enums.py +5 -5
- {fragment_python-1.1.1/fragment/sync_sdk → fragment_python-1.2.0/fragment/sdk}/input_types.py +14 -3
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/std_queries/queries.graphql +34 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/__init__.py +14 -2
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/client.py +48 -0
- fragment_python-1.2.0/fragment/sync_sdk/create_payment.py +40 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/enums.py +5 -5
- {fragment_python-1.1.1/fragment/sdk → fragment_python-1.2.0/fragment/sync_sdk}/input_types.py +14 -3
- {fragment_python-1.1.1 → fragment_python-1.2.0}/pyproject.toml +1 -1
- {fragment_python-1.1.1 → fragment_python-1.2.0}/LICENSE +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/README.md +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/__init__.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/client/__init__.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/client/async_client.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/client/sync_client.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/codegen/__init__.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/codegen/helpers.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/codegen/main.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/codegen/plugins/__init__.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/codegen/plugins/generate_client_method.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/codegen/plugins/generate_typed_entries.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/codegen/plugins/get_file_comment.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/codegen/typed_entries.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/exceptions.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/logger.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/py.typed +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/add_ledger_entries.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/add_ledger_entry.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/add_ledger_entry_runtime.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/async_client.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/base_model.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/create_custom_currency.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/create_custom_link.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/create_ledger.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/delete_custom_txs.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/delete_ledger.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/delete_schema.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/get_account_data_migrations.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/get_entries_to_migrate_for_ledger_account_data_migration.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/get_entries_to_migrate_for_ledger_entry_data_migration.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/get_entry_data_migrations.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/get_ledger.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/get_ledger_account_balance.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/get_ledger_account_balance_with_child_rollup.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/get_ledger_account_lines.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/get_ledger_entry.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/get_schema.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/get_workspace.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/list_ledger_account_balances.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/list_ledger_accounts.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/list_ledger_entries.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/list_ledger_entry_group_balances.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/list_multi_currency_ledger_account_balances.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/migrate_ledger_entry.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/reconcile_tx.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/reconcile_tx_runtime.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/reverse_ledger_entry.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/store_schema.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/sync_custom_accounts.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/sync_custom_txs.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/typed_entries.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/update_ledger.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/update_ledger_entry.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/add_ledger_entries.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/add_ledger_entry.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/add_ledger_entry_runtime.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/async_client.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/base_model.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/create_custom_currency.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/create_custom_link.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/create_ledger.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/delete_custom_txs.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/delete_ledger.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/delete_schema.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_account_data_migrations.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_entries_to_migrate_for_ledger_account_data_migration.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_entries_to_migrate_for_ledger_entry_data_migration.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_entry_data_migrations.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_ledger.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_ledger_account_balance.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_ledger_account_balance_with_child_rollup.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_ledger_account_lines.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_ledger_entry.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_schema.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_workspace.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/list_ledger_account_balances.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/list_ledger_accounts.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/list_ledger_entries.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/list_ledger_entry_group_balances.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/list_multi_currency_ledger_account_balances.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/migrate_ledger_entry.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/reconcile_tx.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/reconcile_tx_runtime.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/reverse_ledger_entry.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/store_schema.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/sync_client.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/sync_custom_accounts.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/sync_custom_txs.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/typed_entries.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/update_ledger.py +0 -0
- {fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/update_ledger_entry.py +0 -0
|
@@ -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,8 +103,8 @@ from .enums import (
|
|
|
97
103
|
SchemaConsistencyMode,
|
|
98
104
|
SchemaLedgerAccountStatus,
|
|
99
105
|
SchemaLedgerEntryStatus,
|
|
100
|
-
SchemaPaymentEntryStatus,
|
|
101
106
|
SchemaPaymentTypeDirection,
|
|
107
|
+
SchemaPaymentTypeStatus,
|
|
102
108
|
SchemaSystemLineKind,
|
|
103
109
|
StripeEnv,
|
|
104
110
|
TxType,
|
|
@@ -184,6 +190,7 @@ from .input_types import (
|
|
|
184
190
|
CreateLedgerAccountInput,
|
|
185
191
|
CreateLedgerAccountsInput,
|
|
186
192
|
CreateLedgerInput,
|
|
193
|
+
CreatePaymentInput,
|
|
187
194
|
CurrencyFilter,
|
|
188
195
|
CurrencyMatchInput,
|
|
189
196
|
CustomAccountInput,
|
|
@@ -462,6 +469,11 @@ __all__ = [
|
|
|
462
469
|
"CreateLedgerCreateLedgerCreateLedgerResultLedgerSchema",
|
|
463
470
|
"CreateLedgerCreateLedgerInternalError",
|
|
464
471
|
"CreateLedgerInput",
|
|
472
|
+
"CreatePayment",
|
|
473
|
+
"CreatePaymentCreatePaymentBadRequestError",
|
|
474
|
+
"CreatePaymentCreatePaymentInternalError",
|
|
475
|
+
"CreatePaymentCreatePaymentPayment",
|
|
476
|
+
"CreatePaymentInput",
|
|
465
477
|
"CurrencyCode",
|
|
466
478
|
"CurrencyFilter",
|
|
467
479
|
"CurrencyMatchInput",
|
|
@@ -707,12 +719,12 @@ __all__ = [
|
|
|
707
719
|
"SchemaMatchInput",
|
|
708
720
|
"SchemaPaymentAccountingInput",
|
|
709
721
|
"SchemaPaymentEntryInput",
|
|
710
|
-
"SchemaPaymentEntryStatus",
|
|
711
722
|
"SchemaPaymentInput",
|
|
712
723
|
"SchemaPaymentLineInput",
|
|
713
724
|
"SchemaPaymentTypeDetailsInput",
|
|
714
725
|
"SchemaPaymentTypeDirection",
|
|
715
726
|
"SchemaPaymentTypeInput",
|
|
727
|
+
"SchemaPaymentTypeStatus",
|
|
716
728
|
"SchemaPaymentsInput",
|
|
717
729
|
"SchemaRepeatedConfigInput",
|
|
718
730
|
"SchemaSystemLineKind",
|
|
@@ -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,15 +299,15 @@ class SchemaLedgerEntryStatus(str, Enum):
|
|
|
299
299
|
disabled = "disabled"
|
|
300
300
|
|
|
301
301
|
|
|
302
|
-
class SchemaPaymentEntryStatus(str, Enum):
|
|
303
|
-
active = "active"
|
|
304
|
-
|
|
305
|
-
|
|
306
302
|
class SchemaPaymentTypeDirection(str, Enum):
|
|
307
303
|
payin = "payin"
|
|
308
304
|
payout = "payout"
|
|
309
305
|
|
|
310
306
|
|
|
307
|
+
class SchemaPaymentTypeStatus(str, Enum):
|
|
308
|
+
active = "active"
|
|
309
|
+
|
|
310
|
+
|
|
311
311
|
class SchemaSystemLineKind(str, Enum):
|
|
312
312
|
payment_fee_line = "payment_fee_line"
|
|
313
313
|
payment_settlement_line = "payment_settlement_line"
|
{fragment_python-1.1.1/fragment/sync_sdk → fragment_python-1.2.0/fragment/sdk}/input_types.py
RENAMED
|
@@ -21,8 +21,8 @@ from .enums import (
|
|
|
21
21
|
SchemaConsistencyMode,
|
|
22
22
|
SchemaLedgerAccountStatus,
|
|
23
23
|
SchemaLedgerEntryStatus,
|
|
24
|
-
SchemaPaymentEntryStatus,
|
|
25
24
|
SchemaPaymentTypeDirection,
|
|
25
|
+
SchemaPaymentTypeStatus,
|
|
26
26
|
SchemaSystemLineKind,
|
|
27
27
|
TxType,
|
|
28
28
|
)
|
|
@@ -120,6 +120,17 @@ class CreateLedgerInput(BaseModel):
|
|
|
120
120
|
type_: Optional[LedgerTypes] = Field(alias="type", default=None)
|
|
121
121
|
|
|
122
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
|
+
|
|
123
134
|
class CurrencyFilter(BaseModel):
|
|
124
135
|
equal_to: Optional["CurrencyMatchInput"] = Field(alias="equalTo", default=None)
|
|
125
136
|
"Must match the value provided"
|
|
@@ -895,7 +906,7 @@ class SchemaPaymentAccountingInput(BaseModel):
|
|
|
895
906
|
"""EXPERIMENTAL: The Ledger Entries a Payment Type posts as a payment moves
|
|
896
907
|
through its lifecycle, keyed by lifecycle transition."""
|
|
897
908
|
|
|
898
|
-
|
|
909
|
+
needs_payment_method_to_processing: Optional["SchemaPaymentEntryInput"] = None
|
|
899
910
|
"Posted when the payment enters processing. Optional."
|
|
900
911
|
processing_to_settled: "SchemaPaymentEntryInput"
|
|
901
912
|
"Posted when the payment settles. Every Payment Type must define it."
|
|
@@ -950,7 +961,7 @@ class SchemaPaymentTypeInput(BaseModel):
|
|
|
950
961
|
"The Ledger Entries posted as the payment moves through its lifecycle."
|
|
951
962
|
payment: "SchemaPaymentTypeDetailsInput"
|
|
952
963
|
"The payment this Payment Type creates."
|
|
953
|
-
status:
|
|
964
|
+
status: SchemaPaymentTypeStatus
|
|
954
965
|
"The status of this Payment Type."
|
|
955
966
|
type_: Any = Field(alias="type")
|
|
956
967
|
"The type of this Payment Type. This is a stable, unique identifier for it.\nUniqueness is enforced at the Schema level."
|
|
@@ -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,8 +102,8 @@ from .enums import (
|
|
|
96
102
|
SchemaConsistencyMode,
|
|
97
103
|
SchemaLedgerAccountStatus,
|
|
98
104
|
SchemaLedgerEntryStatus,
|
|
99
|
-
SchemaPaymentEntryStatus,
|
|
100
105
|
SchemaPaymentTypeDirection,
|
|
106
|
+
SchemaPaymentTypeStatus,
|
|
101
107
|
SchemaSystemLineKind,
|
|
102
108
|
StripeEnv,
|
|
103
109
|
TxType,
|
|
@@ -183,6 +189,7 @@ from .input_types import (
|
|
|
183
189
|
CreateLedgerAccountInput,
|
|
184
190
|
CreateLedgerAccountsInput,
|
|
185
191
|
CreateLedgerInput,
|
|
192
|
+
CreatePaymentInput,
|
|
186
193
|
CurrencyFilter,
|
|
187
194
|
CurrencyMatchInput,
|
|
188
195
|
CustomAccountInput,
|
|
@@ -461,6 +468,11 @@ __all__ = [
|
|
|
461
468
|
"CreateLedgerCreateLedgerCreateLedgerResultLedgerSchema",
|
|
462
469
|
"CreateLedgerCreateLedgerInternalError",
|
|
463
470
|
"CreateLedgerInput",
|
|
471
|
+
"CreatePayment",
|
|
472
|
+
"CreatePaymentCreatePaymentBadRequestError",
|
|
473
|
+
"CreatePaymentCreatePaymentInternalError",
|
|
474
|
+
"CreatePaymentCreatePaymentPayment",
|
|
475
|
+
"CreatePaymentInput",
|
|
464
476
|
"CurrencyCode",
|
|
465
477
|
"CurrencyFilter",
|
|
466
478
|
"CurrencyMatchInput",
|
|
@@ -706,12 +718,12 @@ __all__ = [
|
|
|
706
718
|
"SchemaMatchInput",
|
|
707
719
|
"SchemaPaymentAccountingInput",
|
|
708
720
|
"SchemaPaymentEntryInput",
|
|
709
|
-
"SchemaPaymentEntryStatus",
|
|
710
721
|
"SchemaPaymentInput",
|
|
711
722
|
"SchemaPaymentLineInput",
|
|
712
723
|
"SchemaPaymentTypeDetailsInput",
|
|
713
724
|
"SchemaPaymentTypeDirection",
|
|
714
725
|
"SchemaPaymentTypeInput",
|
|
726
|
+
"SchemaPaymentTypeStatus",
|
|
715
727
|
"SchemaPaymentsInput",
|
|
716
728
|
"SchemaRepeatedConfigInput",
|
|
717
729
|
"SchemaSystemLineKind",
|
|
@@ -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,15 +299,15 @@ class SchemaLedgerEntryStatus(str, Enum):
|
|
|
299
299
|
disabled = "disabled"
|
|
300
300
|
|
|
301
301
|
|
|
302
|
-
class SchemaPaymentEntryStatus(str, Enum):
|
|
303
|
-
active = "active"
|
|
304
|
-
|
|
305
|
-
|
|
306
302
|
class SchemaPaymentTypeDirection(str, Enum):
|
|
307
303
|
payin = "payin"
|
|
308
304
|
payout = "payout"
|
|
309
305
|
|
|
310
306
|
|
|
307
|
+
class SchemaPaymentTypeStatus(str, Enum):
|
|
308
|
+
active = "active"
|
|
309
|
+
|
|
310
|
+
|
|
311
311
|
class SchemaSystemLineKind(str, Enum):
|
|
312
312
|
payment_fee_line = "payment_fee_line"
|
|
313
313
|
payment_settlement_line = "payment_settlement_line"
|
{fragment_python-1.1.1/fragment/sdk → fragment_python-1.2.0/fragment/sync_sdk}/input_types.py
RENAMED
|
@@ -21,8 +21,8 @@ from .enums import (
|
|
|
21
21
|
SchemaConsistencyMode,
|
|
22
22
|
SchemaLedgerAccountStatus,
|
|
23
23
|
SchemaLedgerEntryStatus,
|
|
24
|
-
SchemaPaymentEntryStatus,
|
|
25
24
|
SchemaPaymentTypeDirection,
|
|
25
|
+
SchemaPaymentTypeStatus,
|
|
26
26
|
SchemaSystemLineKind,
|
|
27
27
|
TxType,
|
|
28
28
|
)
|
|
@@ -120,6 +120,17 @@ class CreateLedgerInput(BaseModel):
|
|
|
120
120
|
type_: Optional[LedgerTypes] = Field(alias="type", default=None)
|
|
121
121
|
|
|
122
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
|
+
|
|
123
134
|
class CurrencyFilter(BaseModel):
|
|
124
135
|
equal_to: Optional["CurrencyMatchInput"] = Field(alias="equalTo", default=None)
|
|
125
136
|
"Must match the value provided"
|
|
@@ -895,7 +906,7 @@ class SchemaPaymentAccountingInput(BaseModel):
|
|
|
895
906
|
"""EXPERIMENTAL: The Ledger Entries a Payment Type posts as a payment moves
|
|
896
907
|
through its lifecycle, keyed by lifecycle transition."""
|
|
897
908
|
|
|
898
|
-
|
|
909
|
+
needs_payment_method_to_processing: Optional["SchemaPaymentEntryInput"] = None
|
|
899
910
|
"Posted when the payment enters processing. Optional."
|
|
900
911
|
processing_to_settled: "SchemaPaymentEntryInput"
|
|
901
912
|
"Posted when the payment settles. Every Payment Type must define it."
|
|
@@ -950,7 +961,7 @@ class SchemaPaymentTypeInput(BaseModel):
|
|
|
950
961
|
"The Ledger Entries posted as the payment moves through its lifecycle."
|
|
951
962
|
payment: "SchemaPaymentTypeDetailsInput"
|
|
952
963
|
"The payment this Payment Type creates."
|
|
953
|
-
status:
|
|
964
|
+
status: SchemaPaymentTypeStatus
|
|
954
965
|
"The status of this Payment Type."
|
|
955
966
|
type_: Any = Field(alias="type")
|
|
956
967
|
"The type of this Payment Type. This is a stable, unique identifier for it.\nUniqueness is enforced at the Schema level."
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/codegen/plugins/generate_client_method.py
RENAMED
|
File without changes
|
{fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/codegen/plugins/generate_typed_entries.py
RENAMED
|
File without changes
|
{fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/codegen/plugins/get_file_comment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/list_ledger_account_balances.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sdk/list_ledger_entry_group_balances.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/add_ledger_entry_runtime.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_account_data_migrations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_entry_data_migrations.py
RENAMED
|
File without changes
|
|
File without changes
|
{fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_ledger_account_balance.py
RENAMED
|
File without changes
|
|
File without changes
|
{fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/get_ledger_account_lines.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fragment_python-1.1.1 → fragment_python-1.2.0}/fragment/sync_sdk/list_ledger_account_balances.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|