bb-integrations-library 3.0.11__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.
- bb_integrations_lib/__init__.py +0 -0
- bb_integrations_lib/converters/__init__.py +0 -0
- bb_integrations_lib/gravitate/__init__.py +0 -0
- bb_integrations_lib/gravitate/base_api.py +20 -0
- bb_integrations_lib/gravitate/model.py +29 -0
- bb_integrations_lib/gravitate/pe_api.py +122 -0
- bb_integrations_lib/gravitate/rita_api.py +552 -0
- bb_integrations_lib/gravitate/sd_api.py +572 -0
- bb_integrations_lib/gravitate/testing/TTE/sd/models.py +1398 -0
- bb_integrations_lib/gravitate/testing/TTE/sd/tests/test_models.py +2987 -0
- bb_integrations_lib/gravitate/testing/__init__.py +0 -0
- bb_integrations_lib/gravitate/testing/builder.py +55 -0
- bb_integrations_lib/gravitate/testing/openapi.py +70 -0
- bb_integrations_lib/gravitate/testing/util.py +274 -0
- bb_integrations_lib/mappers/__init__.py +0 -0
- bb_integrations_lib/mappers/prices/__init__.py +0 -0
- bb_integrations_lib/mappers/prices/model.py +106 -0
- bb_integrations_lib/mappers/prices/price_mapper.py +127 -0
- bb_integrations_lib/mappers/prices/protocol.py +20 -0
- bb_integrations_lib/mappers/prices/util.py +61 -0
- bb_integrations_lib/mappers/rita_mapper.py +523 -0
- bb_integrations_lib/models/__init__.py +0 -0
- bb_integrations_lib/models/dtn_supplier_invoice.py +487 -0
- bb_integrations_lib/models/enums.py +28 -0
- bb_integrations_lib/models/pipeline_structs.py +76 -0
- bb_integrations_lib/models/probe/probe_event.py +20 -0
- bb_integrations_lib/models/probe/request_data.py +431 -0
- bb_integrations_lib/models/probe/resume_token.py +7 -0
- bb_integrations_lib/models/rita/audit.py +113 -0
- bb_integrations_lib/models/rita/auth.py +30 -0
- bb_integrations_lib/models/rita/bucket.py +17 -0
- bb_integrations_lib/models/rita/config.py +188 -0
- bb_integrations_lib/models/rita/constants.py +19 -0
- bb_integrations_lib/models/rita/crossroads_entities.py +293 -0
- bb_integrations_lib/models/rita/crossroads_mapping.py +428 -0
- bb_integrations_lib/models/rita/crossroads_monitoring.py +78 -0
- bb_integrations_lib/models/rita/crossroads_network.py +41 -0
- bb_integrations_lib/models/rita/crossroads_rules.py +80 -0
- bb_integrations_lib/models/rita/email.py +39 -0
- bb_integrations_lib/models/rita/issue.py +63 -0
- bb_integrations_lib/models/rita/mapping.py +227 -0
- bb_integrations_lib/models/rita/probe.py +58 -0
- bb_integrations_lib/models/rita/reference_data.py +110 -0
- bb_integrations_lib/models/rita/source_system.py +9 -0
- bb_integrations_lib/models/rita/workers.py +76 -0
- bb_integrations_lib/models/sd/bols_and_drops.py +241 -0
- bb_integrations_lib/models/sd/get_order.py +301 -0
- bb_integrations_lib/models/sd/orders.py +18 -0
- bb_integrations_lib/models/sd_api.py +115 -0
- bb_integrations_lib/pipelines/__init__.py +0 -0
- bb_integrations_lib/pipelines/parsers/__init__.py +0 -0
- bb_integrations_lib/pipelines/parsers/distribution_report/__init__.py +0 -0
- bb_integrations_lib/pipelines/parsers/distribution_report/order_by_site_product_parser.py +50 -0
- bb_integrations_lib/pipelines/parsers/distribution_report/tank_configs_parser.py +47 -0
- bb_integrations_lib/pipelines/parsers/dtn/__init__.py +0 -0
- bb_integrations_lib/pipelines/parsers/dtn/dtn_price_parser.py +102 -0
- bb_integrations_lib/pipelines/parsers/dtn/model.py +79 -0
- bb_integrations_lib/pipelines/parsers/price_engine/__init__.py +0 -0
- bb_integrations_lib/pipelines/parsers/price_engine/parse_accessorials_prices_parser.py +67 -0
- bb_integrations_lib/pipelines/parsers/price_engine/price_file_upload/__init__.py +0 -0
- bb_integrations_lib/pipelines/parsers/price_engine/price_file_upload/price_merge_parser.py +111 -0
- bb_integrations_lib/pipelines/parsers/price_engine/price_file_upload/price_sync_parser.py +107 -0
- bb_integrations_lib/pipelines/parsers/price_engine/price_file_upload/shared.py +81 -0
- bb_integrations_lib/pipelines/parsers/tank_reading_parser.py +155 -0
- bb_integrations_lib/pipelines/parsers/tank_sales_parser.py +144 -0
- bb_integrations_lib/pipelines/shared/__init__.py +0 -0
- bb_integrations_lib/pipelines/shared/allocation_matching.py +227 -0
- bb_integrations_lib/pipelines/shared/bol_allocation.py +2793 -0
- bb_integrations_lib/pipelines/steps/__init__.py +0 -0
- bb_integrations_lib/pipelines/steps/create_accessorials_step.py +80 -0
- bb_integrations_lib/pipelines/steps/distribution_report/__init__.py +0 -0
- bb_integrations_lib/pipelines/steps/distribution_report/distribution_report_datafram_to_raw_data.py +33 -0
- bb_integrations_lib/pipelines/steps/distribution_report/get_model_history_step.py +50 -0
- bb_integrations_lib/pipelines/steps/distribution_report/get_order_by_site_product_step.py +62 -0
- bb_integrations_lib/pipelines/steps/distribution_report/get_tank_configs_step.py +40 -0
- bb_integrations_lib/pipelines/steps/distribution_report/join_distribution_order_dos_step.py +85 -0
- bb_integrations_lib/pipelines/steps/distribution_report/upload_distribution_report_datafram_to_big_query.py +47 -0
- bb_integrations_lib/pipelines/steps/echo_step.py +14 -0
- bb_integrations_lib/pipelines/steps/export_dataframe_to_rawdata_step.py +28 -0
- bb_integrations_lib/pipelines/steps/exporting/__init__.py +0 -0
- bb_integrations_lib/pipelines/steps/exporting/bbd_export_payroll_file_step.py +107 -0
- bb_integrations_lib/pipelines/steps/exporting/bbd_export_readings_step.py +236 -0
- bb_integrations_lib/pipelines/steps/exporting/cargas_wholesale_bundle_upload_step.py +33 -0
- bb_integrations_lib/pipelines/steps/exporting/dataframe_flat_file_export.py +29 -0
- bb_integrations_lib/pipelines/steps/exporting/gcs_bucket_export_file_step.py +34 -0
- bb_integrations_lib/pipelines/steps/exporting/keyvu_export_step.py +356 -0
- bb_integrations_lib/pipelines/steps/exporting/pe_price_export_step.py +238 -0
- bb_integrations_lib/pipelines/steps/exporting/platform_science_order_sync_step.py +500 -0
- bb_integrations_lib/pipelines/steps/exporting/save_rawdata_to_disk.py +15 -0
- bb_integrations_lib/pipelines/steps/exporting/sftp_export_file_step.py +60 -0
- bb_integrations_lib/pipelines/steps/exporting/sftp_export_many_files_step.py +23 -0
- bb_integrations_lib/pipelines/steps/exporting/update_exported_orders_table_step.py +64 -0
- bb_integrations_lib/pipelines/steps/filter_step.py +22 -0
- bb_integrations_lib/pipelines/steps/get_latest_sync_date.py +34 -0
- bb_integrations_lib/pipelines/steps/importing/bbd_import_payroll_step.py +30 -0
- bb_integrations_lib/pipelines/steps/importing/get_order_numbers_to_export_step.py +138 -0
- bb_integrations_lib/pipelines/steps/importing/load_file_to_dataframe_step.py +46 -0
- bb_integrations_lib/pipelines/steps/importing/load_imap_attachment_step.py +172 -0
- bb_integrations_lib/pipelines/steps/importing/pe_bulk_sync_price_structure_step.py +68 -0
- bb_integrations_lib/pipelines/steps/importing/pe_price_merge_step.py +86 -0
- bb_integrations_lib/pipelines/steps/importing/sftp_file_config_step.py +124 -0
- bb_integrations_lib/pipelines/steps/importing/test_exact_file_match.py +57 -0
- bb_integrations_lib/pipelines/steps/null_step.py +15 -0
- bb_integrations_lib/pipelines/steps/pe_integration_job_step.py +32 -0
- bb_integrations_lib/pipelines/steps/processing/__init__.py +0 -0
- bb_integrations_lib/pipelines/steps/processing/archive_gcs_step.py +76 -0
- bb_integrations_lib/pipelines/steps/processing/archive_sftp_step.py +48 -0
- bb_integrations_lib/pipelines/steps/processing/bbd_format_tank_readings_step.py +492 -0
- bb_integrations_lib/pipelines/steps/processing/bbd_upload_prices_step.py +54 -0
- bb_integrations_lib/pipelines/steps/processing/bbd_upload_tank_sales_step.py +124 -0
- bb_integrations_lib/pipelines/steps/processing/bbd_upload_tankreading_step.py +80 -0
- bb_integrations_lib/pipelines/steps/processing/convert_bbd_order_to_cargas_step.py +226 -0
- bb_integrations_lib/pipelines/steps/processing/delete_sftp_step.py +33 -0
- bb_integrations_lib/pipelines/steps/processing/dtn/__init__.py +2 -0
- bb_integrations_lib/pipelines/steps/processing/dtn/convert_dtn_invoice_to_sd_model.py +145 -0
- bb_integrations_lib/pipelines/steps/processing/dtn/parse_dtn_invoice_step.py +38 -0
- bb_integrations_lib/pipelines/steps/processing/file_config_parser_step.py +720 -0
- bb_integrations_lib/pipelines/steps/processing/file_config_parser_step_v2.py +418 -0
- bb_integrations_lib/pipelines/steps/processing/get_sd_price_price_request.py +105 -0
- bb_integrations_lib/pipelines/steps/processing/keyvu_upload_deliveryplan_step.py +39 -0
- bb_integrations_lib/pipelines/steps/processing/mark_orders_exported_in_bbd_step.py +185 -0
- bb_integrations_lib/pipelines/steps/processing/pe_price_rows_processing_step.py +174 -0
- bb_integrations_lib/pipelines/steps/processing/send_process_report_step.py +47 -0
- bb_integrations_lib/pipelines/steps/processing/sftp_renamer_step.py +61 -0
- bb_integrations_lib/pipelines/steps/processing/tank_reading_touchup_steps.py +75 -0
- bb_integrations_lib/pipelines/steps/processing/upload_supplier_invoice_step.py +16 -0
- bb_integrations_lib/pipelines/steps/send_attached_in_rita_email_step.py +44 -0
- bb_integrations_lib/pipelines/steps/send_rita_email_step.py +34 -0
- bb_integrations_lib/pipelines/steps/sleep_step.py +24 -0
- bb_integrations_lib/pipelines/wrappers/__init__.py +0 -0
- bb_integrations_lib/pipelines/wrappers/accessorials_transformation.py +104 -0
- bb_integrations_lib/pipelines/wrappers/distribution_report.py +191 -0
- bb_integrations_lib/pipelines/wrappers/export_tank_readings.py +237 -0
- bb_integrations_lib/pipelines/wrappers/import_tank_readings.py +192 -0
- bb_integrations_lib/pipelines/wrappers/wrapper.py +81 -0
- bb_integrations_lib/protocols/__init__.py +0 -0
- bb_integrations_lib/protocols/flat_file.py +210 -0
- bb_integrations_lib/protocols/gravitate_client.py +104 -0
- bb_integrations_lib/protocols/pipelines.py +697 -0
- bb_integrations_lib/provider/__init__.py +0 -0
- bb_integrations_lib/provider/api/__init__.py +0 -0
- bb_integrations_lib/provider/api/cargas/__init__.py +0 -0
- bb_integrations_lib/provider/api/cargas/client.py +43 -0
- bb_integrations_lib/provider/api/cargas/model.py +49 -0
- bb_integrations_lib/provider/api/cargas/protocol.py +23 -0
- bb_integrations_lib/provider/api/dtn/__init__.py +0 -0
- bb_integrations_lib/provider/api/dtn/client.py +128 -0
- bb_integrations_lib/provider/api/dtn/protocol.py +9 -0
- bb_integrations_lib/provider/api/keyvu/__init__.py +0 -0
- bb_integrations_lib/provider/api/keyvu/client.py +30 -0
- bb_integrations_lib/provider/api/keyvu/model.py +149 -0
- bb_integrations_lib/provider/api/macropoint/__init__.py +0 -0
- bb_integrations_lib/provider/api/macropoint/client.py +28 -0
- bb_integrations_lib/provider/api/macropoint/model.py +40 -0
- bb_integrations_lib/provider/api/pc_miler/__init__.py +0 -0
- bb_integrations_lib/provider/api/pc_miler/client.py +130 -0
- bb_integrations_lib/provider/api/pc_miler/model.py +6 -0
- bb_integrations_lib/provider/api/pc_miler/web_services_apis.py +131 -0
- bb_integrations_lib/provider/api/platform_science/__init__.py +0 -0
- bb_integrations_lib/provider/api/platform_science/client.py +147 -0
- bb_integrations_lib/provider/api/platform_science/model.py +82 -0
- bb_integrations_lib/provider/api/quicktrip/__init__.py +0 -0
- bb_integrations_lib/provider/api/quicktrip/client.py +52 -0
- bb_integrations_lib/provider/api/telapoint/__init__.py +0 -0
- bb_integrations_lib/provider/api/telapoint/client.py +68 -0
- bb_integrations_lib/provider/api/telapoint/model.py +178 -0
- bb_integrations_lib/provider/api/warren_rogers/__init__.py +0 -0
- bb_integrations_lib/provider/api/warren_rogers/client.py +207 -0
- bb_integrations_lib/provider/aws/__init__.py +0 -0
- bb_integrations_lib/provider/aws/s3/__init__.py +0 -0
- bb_integrations_lib/provider/aws/s3/client.py +126 -0
- bb_integrations_lib/provider/ftp/__init__.py +0 -0
- bb_integrations_lib/provider/ftp/client.py +140 -0
- bb_integrations_lib/provider/ftp/interface.py +273 -0
- bb_integrations_lib/provider/ftp/model.py +76 -0
- bb_integrations_lib/provider/imap/__init__.py +0 -0
- bb_integrations_lib/provider/imap/client.py +228 -0
- bb_integrations_lib/provider/imap/model.py +3 -0
- bb_integrations_lib/provider/sqlserver/__init__.py +0 -0
- bb_integrations_lib/provider/sqlserver/client.py +106 -0
- bb_integrations_lib/secrets/__init__.py +4 -0
- bb_integrations_lib/secrets/adapters.py +98 -0
- bb_integrations_lib/secrets/credential_models.py +222 -0
- bb_integrations_lib/secrets/factory.py +85 -0
- bb_integrations_lib/secrets/providers.py +160 -0
- bb_integrations_lib/shared/__init__.py +0 -0
- bb_integrations_lib/shared/exceptions.py +25 -0
- bb_integrations_lib/shared/model.py +1039 -0
- bb_integrations_lib/shared/shared_enums.py +510 -0
- bb_integrations_lib/storage/README.md +236 -0
- bb_integrations_lib/storage/__init__.py +0 -0
- bb_integrations_lib/storage/aws/__init__.py +0 -0
- bb_integrations_lib/storage/aws/s3.py +8 -0
- bb_integrations_lib/storage/defaults.py +72 -0
- bb_integrations_lib/storage/gcs/__init__.py +0 -0
- bb_integrations_lib/storage/gcs/client.py +8 -0
- bb_integrations_lib/storage/gcsmanager/__init__.py +0 -0
- bb_integrations_lib/storage/gcsmanager/client.py +8 -0
- bb_integrations_lib/storage/setup.py +29 -0
- bb_integrations_lib/util/__init__.py +0 -0
- bb_integrations_lib/util/cache/__init__.py +0 -0
- bb_integrations_lib/util/cache/custom_ttl_cache.py +75 -0
- bb_integrations_lib/util/cache/protocol.py +9 -0
- bb_integrations_lib/util/config/__init__.py +0 -0
- bb_integrations_lib/util/config/manager.py +391 -0
- bb_integrations_lib/util/config/model.py +41 -0
- bb_integrations_lib/util/exception_logger/__init__.py +0 -0
- bb_integrations_lib/util/exception_logger/exception_logger.py +146 -0
- bb_integrations_lib/util/exception_logger/test.py +114 -0
- bb_integrations_lib/util/utils.py +364 -0
- bb_integrations_lib/workers/__init__.py +0 -0
- bb_integrations_lib/workers/groups.py +13 -0
- bb_integrations_lib/workers/rpc_worker.py +50 -0
- bb_integrations_lib/workers/topics.py +20 -0
- bb_integrations_library-3.0.11.dist-info/METADATA +59 -0
- bb_integrations_library-3.0.11.dist-info/RECORD +217 -0
- bb_integrations_library-3.0.11.dist-info/WHEEL +4 -0
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import httpx
|
|
2
|
+
from bb_integrations_lib.secrets import AnyCredential
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class BaseAPI(httpx.AsyncClient):
|
|
6
|
+
"""
|
|
7
|
+
I'm choosing to keep our BaseAPI client to add global \
|
|
8
|
+
utility methods with ease in the future. \
|
|
9
|
+
Wrap other API clients with this.
|
|
10
|
+
"""
|
|
11
|
+
def __init__(self, raise_errors: bool = True):
|
|
12
|
+
super().__init__()
|
|
13
|
+
self.raise_errors = raise_errors
|
|
14
|
+
|
|
15
|
+
@classmethod
|
|
16
|
+
def from_credential(cls, credential: AnyCredential) -> "BaseAPI":
|
|
17
|
+
raise NotImplementedError()
|
|
18
|
+
|
|
19
|
+
async def close(self):
|
|
20
|
+
await self.aclose()
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from typing import Dict, Optional
|
|
3
|
+
|
|
4
|
+
from pydantic import BaseModel, field_validator
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class System(str, Enum):
|
|
8
|
+
pe: str = "pricing_engine"
|
|
9
|
+
sd: str = "supply_and_dispatch"
|
|
10
|
+
rita: str = "rita"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class GravitateConfig(BaseModel):
|
|
14
|
+
type: Optional[str] = None
|
|
15
|
+
dbs: Optional[Dict[str, str]] = {}
|
|
16
|
+
system_psk: Optional[str] = None
|
|
17
|
+
conn_str: Optional[str] = None
|
|
18
|
+
url: Optional[str] = None
|
|
19
|
+
admin_username: Optional[str] = None
|
|
20
|
+
admin_password: Optional[str] = None
|
|
21
|
+
system:Optional[System] = System.sd
|
|
22
|
+
short_name: Optional[str] = None
|
|
23
|
+
|
|
24
|
+
@field_validator("admin_username", "admin_password", "url", mode="before")
|
|
25
|
+
@classmethod
|
|
26
|
+
def strip_whitespace(cls, value):
|
|
27
|
+
if value and isinstance(value, str):
|
|
28
|
+
return value.strip()
|
|
29
|
+
return value
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
from async_lru import alru_cache
|
|
2
|
+
from typing import Optional, Dict, Self
|
|
3
|
+
from httpx import Response
|
|
4
|
+
from tenacity import retry, stop_after_attempt, wait_fixed
|
|
5
|
+
|
|
6
|
+
from bb_integrations_lib.gravitate.base_api import BaseAPI
|
|
7
|
+
from bb_integrations_lib.secrets import PECredential
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class GravitatePEAPI(BaseAPI):
|
|
11
|
+
def __init__(
|
|
12
|
+
self,
|
|
13
|
+
base_url: str | None = None,
|
|
14
|
+
username: str | None = None,
|
|
15
|
+
password: str | None = None,
|
|
16
|
+
raise_errors: bool = True,
|
|
17
|
+
):
|
|
18
|
+
super().__init__(raise_errors)
|
|
19
|
+
self.base_url = self.valid_url(base_url)
|
|
20
|
+
self.username = username
|
|
21
|
+
self.password = password
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@staticmethod
|
|
25
|
+
def valid_url(url: str) -> str:
|
|
26
|
+
if not url:
|
|
27
|
+
return ""
|
|
28
|
+
if not url.endswith("/"):
|
|
29
|
+
url += "/"
|
|
30
|
+
if "api" not in url and ":80" not in url and "local"not in url: #MOFO
|
|
31
|
+
url += "api/"
|
|
32
|
+
if not url.startswith("http"):
|
|
33
|
+
raise ValueError(f"Invalid URL: {url} must begin with http or https")
|
|
34
|
+
return url
|
|
35
|
+
|
|
36
|
+
@alru_cache(maxsize=2)
|
|
37
|
+
async def _get_token(self):
|
|
38
|
+
try:
|
|
39
|
+
if self.username and self.password:
|
|
40
|
+
resp = await self.post(
|
|
41
|
+
url=f"{self.base_url}token/authorize",
|
|
42
|
+
data={
|
|
43
|
+
"username": self.username,
|
|
44
|
+
"password": self.password,
|
|
45
|
+
"scope": "bbd",
|
|
46
|
+
},
|
|
47
|
+
timeout=120
|
|
48
|
+
)
|
|
49
|
+
else:
|
|
50
|
+
raise RuntimeError(
|
|
51
|
+
"Provide (username, password) to the GravitatePEAPI")
|
|
52
|
+
except Exception as e:
|
|
53
|
+
raise ValueError(f"Error Getting Token for {self.base_url}")
|
|
54
|
+
try:
|
|
55
|
+
return resp.json()["access_token"]
|
|
56
|
+
except:
|
|
57
|
+
raise ValueError(
|
|
58
|
+
f"Could Not Get Token for {self.base_url} -> {resp.status_code}"
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_credential(cls, credential: PECredential) -> Self:
|
|
63
|
+
return cls(
|
|
64
|
+
base_url=credential.host,
|
|
65
|
+
username=credential.username,
|
|
66
|
+
password=credential.password,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
async def token_post(self, **kwargs) -> Response:
|
|
70
|
+
headers = kwargs.get("headers", {})
|
|
71
|
+
headers = {**headers, "authorization": f"Bearer {await self._get_token()}"}
|
|
72
|
+
url = kwargs.get("url", "")
|
|
73
|
+
url = f"{self.base_url}{url}"
|
|
74
|
+
kwargs = kwargs | {"url": url, "headers": headers}
|
|
75
|
+
return await self.post(**kwargs)
|
|
76
|
+
|
|
77
|
+
async def token_get(self, **kwargs) -> Response:
|
|
78
|
+
headers = kwargs.get("headers", {})
|
|
79
|
+
headers = {**headers, "authorization": f"Bearer {await self._get_token()}"}
|
|
80
|
+
url = kwargs.get("url", "")
|
|
81
|
+
url = f"{self.base_url}{url}"
|
|
82
|
+
kwargs = kwargs | {"url": url, "headers": headers}
|
|
83
|
+
return await self.get(**kwargs)
|
|
84
|
+
|
|
85
|
+
@retry(stop=stop_after_attempt(3), wait=wait_fixed(5))
|
|
86
|
+
async def call_ep(self, url: str, payload: Optional[Dict] = None, json: Optional[Dict] = None) -> Dict:
|
|
87
|
+
return await self.token_post(url, payload, json)
|
|
88
|
+
|
|
89
|
+
@retry(stop=stop_after_attempt(3), wait=wait_fixed(5))
|
|
90
|
+
async def get_contracts(self, payload: Dict):
|
|
91
|
+
url = "extract/contractManagement/contract/ByQuery"
|
|
92
|
+
return (await self.token_post(url=url, json=payload)).json()
|
|
93
|
+
|
|
94
|
+
@retry(stop=stop_after_attempt(3), wait=wait_fixed(5))
|
|
95
|
+
async def get_prices(self, payload: Dict) -> Dict:
|
|
96
|
+
url = "extract/price/ByQuery"
|
|
97
|
+
return (await self.token_post(url=url, json=payload)).json()
|
|
98
|
+
|
|
99
|
+
@retry(stop=stop_after_attempt(3), wait=wait_fixed(5))
|
|
100
|
+
async def bulk_sync_price_structure(self, payload: Dict) -> Dict:
|
|
101
|
+
url = "integration/pricing/BulkSyncPriceStructure"
|
|
102
|
+
return (await self.token_post(url=url, json=payload)).json()
|
|
103
|
+
|
|
104
|
+
@retry(stop=stop_after_attempt(3), wait=wait_fixed(5))
|
|
105
|
+
async def merge_prices(self, payload: Dict) -> Dict:
|
|
106
|
+
url = "integration/pricing/Merge"
|
|
107
|
+
return (await self.token_post(url=url, json=payload)).json()
|
|
108
|
+
|
|
109
|
+
@retry(stop=stop_after_attempt(3), wait=wait_fixed(5))
|
|
110
|
+
async def integration_start(self, payload: Dict):
|
|
111
|
+
url = "Integration/IntegrationStatus/IntegrationStart"
|
|
112
|
+
return (await self.token_post(url=url, payload=payload)).json()
|
|
113
|
+
|
|
114
|
+
@retry(stop=stop_after_attempt(3), wait=wait_fixed(5))
|
|
115
|
+
async def integration_stop(self, payload: Dict):
|
|
116
|
+
url = "Integration/IntegrationStatus/IntegrationStop"
|
|
117
|
+
return (await self.token_post(url=url, payload=payload)).json()
|
|
118
|
+
|
|
119
|
+
@retry(stop=stop_after_attempt(3), wait=wait_fixed(5))
|
|
120
|
+
async def integration_error(self, payload: Dict):
|
|
121
|
+
url = "Integration/IntegrationStatus/IntegrationError"
|
|
122
|
+
return (await self.token_post(url=url, payload=payload)).json()
|