-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstreams.py
More file actions
61 lines (43 loc) · 1.89 KB
/
streams.py
File metadata and controls
61 lines (43 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
"""Stream type classes for tap-exact."""
from __future__ import annotations
import typing as t
from tap_exact.client import ExactStream
from tap_exact.schemas import (
assets_schema,
gl_account_classification_mappings_schema,
gl_accounts_schema,
gl_classifications_schema,
transaction_lines_schema,
)
class TransactionLinesStream(ExactStream):
"""Define TransactionLines stream."""
name = "transaction_lines"
path = "/bulk/Financial/TransactionLines"
primary_keys: t.ClassVar[list[str]] = ["ID", "Division"]
replication_key: t.ClassVar[str] = "Modified"
schema = transaction_lines_schema # pyright: ignore[reportAssignmentType]
class GLAccountsStream(ExactStream):
"""Define GLAccounts stream."""
name = "gl_accounts"
path = "/bulk/Financial/GLAccounts"
primary_keys: t.ClassVar[list[str]] = ["ID", "Division"]
replication_key: t.ClassVar[str] = "Modified"
schema = gl_accounts_schema # pyright: ignore[reportAssignmentType]
class GLClassificationsStream(ExactStream):
"""Define GLClassifications stream."""
name = "gl_classifications"
path = "/sync/Financial/GLClassifications"
primary_keys: t.ClassVar[list[str]] = ["ID", "Division"]
schema = gl_classifications_schema # pyright: ignore[reportAssignmentType]
class GLAccountClassificationMappingsStream(ExactStream):
"""Define GLAccountClassificationMappings stream."""
name = "gl_account_classification_mappings"
path = "/Financial/GLAccountClassificationMappings"
primary_keys: t.ClassVar[list[str]] = ["ID", "Division"]
schema = gl_account_classification_mappings_schema # pyright: ignore[reportAssignmentType]
class AssetsStream(ExactStream):
"""Define Assets stream."""
name = "assets"
path = "/assets/Assets"
primary_keys: t.ClassVar[list[str]] = ["ID", "Division"]
schema = assets_schema # pyright: ignore[reportAssignmentType]