save and confirmed added
This commit is contained in:
@@ -11,8 +11,8 @@ def get_account_records_from_json():
|
||||
read_files_json, with_pydantic = read_json_file(json_file="account_records"), []
|
||||
read_files = read_files_json.get("account_records")
|
||||
for row in read_files:
|
||||
if not row['bank_reference_code']:
|
||||
row['bank_reference_code'] = "NOT FOUND"
|
||||
if not row["bank_reference_code"]:
|
||||
row["bank_reference_code"] = "NOT FOUND"
|
||||
pydantic_row = InsertAccountRecord(**row)
|
||||
with_pydantic.append(pydantic_row.model_dump())
|
||||
if not with_pydantic:
|
||||
@@ -20,12 +20,11 @@ def get_account_records_from_json():
|
||||
return with_pydantic
|
||||
|
||||
|
||||
|
||||
def migrate_account_records(requester: BothAPIS):
|
||||
account_records = get_account_records_from_json()
|
||||
for account_record in account_records:
|
||||
response = requester.local_api.post(
|
||||
endpoint="/account/records/create", data=account_record
|
||||
)
|
||||
print('response.text', response.text)
|
||||
print('response.status_code', response.json())
|
||||
print("response.text", response.text)
|
||||
print("response.status_code", response.json())
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from service_app_test.api_configs import BothAPIS
|
||||
from service_app_test.test_application.evyos.address_building import post_code_dict
|
||||
from service_app_test.test_application.migrate_old_data.get_occupants_codes import get_occupants_types
|
||||
from service_app_test.test_application.migrate_old_data.get_occupants_codes import (
|
||||
get_occupants_types,
|
||||
)
|
||||
from service_app_test.test_application.migrate_old_data.reader_and_alchemy_bulk_actions import (
|
||||
read_json_file,
|
||||
)
|
||||
@@ -90,6 +92,7 @@ address_dict = lambda post_code_uu_id: {
|
||||
"build_number": "11",
|
||||
}
|
||||
|
||||
|
||||
def get_build_living_space_from_json():
|
||||
read_files_json, with_pydantic = read_json_file(json_file="build_living_space"), []
|
||||
read_files = read_files_json.get("build_living_space")
|
||||
@@ -173,15 +176,19 @@ def migrate_build_area(requester: BothAPIS, build_uu_id: str):
|
||||
|
||||
|
||||
def migrate_build_part(
|
||||
requester: BothAPIS, build_uu_id: str, build_part_type_uu_id: str, part_direction_uu_id: str
|
||||
requester: BothAPIS,
|
||||
build_uu_id: str,
|
||||
build_part_type_uu_id: str,
|
||||
part_direction_uu_id: str,
|
||||
):
|
||||
# build_uu_id = grab_new_build_uu_id(requester=requester, build_uu_id=build_uu_id)
|
||||
response_datas = get_build_part_from_json(
|
||||
build_part_type_uu_id=build_part_type_uu_id, part_direction_uu_id=part_direction_uu_id
|
||||
build_part_type_uu_id=build_part_type_uu_id,
|
||||
part_direction_uu_id=part_direction_uu_id,
|
||||
)
|
||||
|
||||
for response_data in response_datas:
|
||||
if response_data.get('part_no') == 0:
|
||||
if response_data.get("part_no") == 0:
|
||||
continue
|
||||
response_data["build_uu_id"] = build_uu_id
|
||||
response = requester.local_api.post(
|
||||
@@ -209,28 +216,42 @@ def migrate_build_living_space(requester: BothAPIS):
|
||||
print("b response_data[person_uu_id]", response_data["person_uu_id"])
|
||||
response = requester.local_api.post(
|
||||
endpoint="/people/list",
|
||||
data={"page": 1, "size": 1, "query": {"ref_id": response_data["person_uu_id"]}},
|
||||
data={
|
||||
"page": 1,
|
||||
"size": 1,
|
||||
"query": {"ref_id": response_data["person_uu_id"]},
|
||||
},
|
||||
)
|
||||
print("/people/list response", response.text)
|
||||
response_data["person_uu_id"] = response.json()["data"][0]["uu_id"]
|
||||
print("a response_data[person_uu_id]", response_data["person_uu_id"])
|
||||
response = requester.local_api.post(
|
||||
endpoint="/building/parts/list",
|
||||
data={"page": 1, "size": 30, "query": {"ref_id": response_data.get("build_parts_uu_id")}},
|
||||
data={
|
||||
"page": 1,
|
||||
"size": 30,
|
||||
"query": {"ref_id": response_data.get("build_parts_uu_id")},
|
||||
},
|
||||
)
|
||||
print("/building/parts/list response", response.text)
|
||||
response_data["build_parts_uu_id"] = response.json()["data"][0]["uu_id"]
|
||||
|
||||
flat_owner = "b9392bef-32cb-4c7d-b99f-5f613c2e2120"
|
||||
flat_tenants = "a40aea36-0dce-48cc-9334-2e776ba22a49"
|
||||
if response_data.get('occupant_type_uu_id') == flat_owner:
|
||||
response = get_occupants_types(occupant_code="FL-OWN", requester=requester.local_api)
|
||||
if response_data.get("occupant_type_uu_id") == flat_owner:
|
||||
response = get_occupants_types(
|
||||
occupant_code="FL-OWN", requester=requester.local_api
|
||||
)
|
||||
response_data["occupant_type_uu_id"] = response["data"]["uu_id"]
|
||||
elif response_data.get('occupant_type_uu_id') == flat_tenants:
|
||||
response = get_occupants_types(occupant_code="FL-TEN", requester=requester.local_api)
|
||||
elif response_data.get("occupant_type_uu_id") == flat_tenants:
|
||||
response = get_occupants_types(
|
||||
occupant_code="FL-TEN", requester=requester.local_api
|
||||
)
|
||||
response_data["occupant_type_uu_id"] = response["data"]["uu_id"]
|
||||
else:
|
||||
response = get_occupants_types(occupant_code="FL-RES", requester=requester.local_api)
|
||||
response = get_occupants_types(
|
||||
occupant_code="FL-RES", requester=requester.local_api
|
||||
)
|
||||
response_data["occupant_type_uu_id"] = response["data"]["uu_id"]
|
||||
|
||||
response = requester.local_api.post(
|
||||
@@ -240,27 +261,31 @@ def migrate_build_living_space(requester: BothAPIS):
|
||||
return
|
||||
|
||||
|
||||
|
||||
def migrate_build(requester: BothAPIS):
|
||||
from service_app_test.test_application.migrate_old_data.get_building_types import (
|
||||
list_building_types,
|
||||
)
|
||||
from service_app_test.test_application.migrate_old_data.get_type_codes import (
|
||||
get_type_codes_key_and_class
|
||||
get_type_codes_key_and_class,
|
||||
)
|
||||
|
||||
building_type_flat = list_building_types(requester=requester.local_api, type_code="daire").get("uu_id")
|
||||
building_type_build = list_building_types(requester=requester.local_api, type_code="apt").get("uu_id")
|
||||
building_type_flat = list_building_types(
|
||||
requester=requester.local_api, type_code="daire"
|
||||
).get("uu_id")
|
||||
building_type_build = list_building_types(
|
||||
requester=requester.local_api, type_code="apt"
|
||||
).get("uu_id")
|
||||
api_enum_dropdown_nn = get_type_codes_key_and_class(
|
||||
class_name="Directions", key_name="NN", requester=requester.local_api
|
||||
)
|
||||
api_enum_dropdown_nn_uuid = api_enum_dropdown_nn.get("data").get("uu_id")
|
||||
street_uu_id = search_street("Reşat Nuri", requester=requester)
|
||||
post_code_uuid = create_address(requester=requester, post_code=post_code_dict(uu_id_street=street_uu_id))
|
||||
post_code_uuid = create_address(
|
||||
requester=requester, post_code=post_code_dict(uu_id_street=street_uu_id)
|
||||
)
|
||||
|
||||
created_address = create_addresses(
|
||||
address=address_dict(post_code_uu_id=post_code_uuid),
|
||||
requester=requester
|
||||
address=address_dict(post_code_uu_id=post_code_uuid), requester=requester
|
||||
)
|
||||
created_address_uu_id = created_address["data"]["uu_id"]
|
||||
for response_data in get_build_from_json():
|
||||
@@ -274,7 +299,7 @@ def migrate_build(requester: BothAPIS):
|
||||
requester=requester,
|
||||
build_uu_id=build_uu_id,
|
||||
build_part_type_uu_id=building_type_flat,
|
||||
part_direction_uu_id=api_enum_dropdown_nn_uuid
|
||||
part_direction_uu_id=api_enum_dropdown_nn_uuid,
|
||||
)
|
||||
# migrate_build_iban(requester=requester, build_uu_id=build_uu_id)
|
||||
return
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
def list_building_types(requester, lang: str = "TR", type_code: str = None):
|
||||
from service_app_test.test_application.evyos.datas.company_employee_data import (
|
||||
list_options,
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import random
|
||||
|
||||
from service_app_test.api_configs import BothAPIS
|
||||
from api_validations.validations_request import InsertPerson
|
||||
from api_validations.validations_request import InsertPerson, InsertUsers
|
||||
from service_app_test.test_application.migrate_old_data.reader_and_alchemy_bulk_actions import (
|
||||
read_json_file,
|
||||
)
|
||||
|
||||
# from service_app_test.test_application.evyos.people import generate_random_phone_number
|
||||
|
||||
requester_dict_build = lambda data: {"endpoint": "/people/create", "data": data}
|
||||
|
||||
|
||||
@@ -15,18 +17,40 @@ def get_people_from_json():
|
||||
for row in read_files:
|
||||
row["ref_id"] = row["uu_id"]
|
||||
pydantic_row = InsertPerson(**row)
|
||||
with_pydantic.append(pydantic_row.model_dump())
|
||||
data_dict = pydantic_row.model_dump()
|
||||
data_dict["email"] = row.get("emails")
|
||||
with_pydantic.append(data_dict)
|
||||
if not with_pydantic:
|
||||
raise Exception("No data found")
|
||||
return with_pydantic
|
||||
|
||||
|
||||
generate_random_national_identity_id = lambda n: str(random.randint(10 ** (n - 1), 10**n))
|
||||
generate_random_national_identity_id = lambda n: str(
|
||||
random.randint(10 ** (n - 1), 10**n)
|
||||
)
|
||||
|
||||
|
||||
def migrate_people(requester: BothAPIS):
|
||||
for response_data in get_people_from_json():
|
||||
users_email = response_data.get("email")
|
||||
response_data["national_identity_id"] = generate_random_national_identity_id(11)
|
||||
response_data.pop("email", None)
|
||||
response = requester.local_api.post(**requester_dict_build(data=response_data))
|
||||
print("response", response.text)
|
||||
if response.ok:
|
||||
user_json = response.json().get("data", None)
|
||||
if not user_json:
|
||||
raise Exception("User can not be created user json is invalid")
|
||||
created_user = InsertUsers(
|
||||
people_uu_id=user_json.get("uu_id"),
|
||||
user_tag=user_json.get("firstname"),
|
||||
email=users_email,
|
||||
# phone_number=generate_random_phone_number(),
|
||||
avatar="https://s.tmimgcdn.com/scr/800x500/276800/building-home-nature-logo-vector-template-3_276851-original.jpg",
|
||||
)
|
||||
response = requester.local_api.post(
|
||||
endpoint="/user/create",
|
||||
data=created_user.model_dump(),
|
||||
)
|
||||
print("response", response.text)
|
||||
return
|
||||
|
||||
@@ -1,51 +1,49 @@
|
||||
import arrow
|
||||
|
||||
from service_app_test.bases import RequestToApi
|
||||
from service_app_test.api_configs import WagAPI, LocalAPI, BothAPIS
|
||||
from service_app_test.test_application.evyos.decision_book import run_decision_book_depends
|
||||
from service_app_test.api_configs import LocalAPI, BothAPIS
|
||||
from service_app_test.test_application.evyos.decision_book import (
|
||||
run_decision_book_depends, list_decision_books,
|
||||
)
|
||||
from service_app_test.test_application.evyos.decision_book_items import (
|
||||
send_invitation_to_building_residents,
|
||||
collect_invitation_to_building_residents,
|
||||
assign_people_to_pre_or_wrt
|
||||
assign_people_to_pre_or_wrt, run_decision_book_items,
|
||||
)
|
||||
from service_app_test.test_application.migrate_old_data.get_type_codes import get_type_codes_key_and_class
|
||||
from service_app_test.test_application.migrate_old_data.people import migrate_people
|
||||
from service_app_test.test_application.migrate_old_data.building import (
|
||||
migrate_build, migrate_build_living_space,
|
||||
migrate_build,
|
||||
migrate_build_living_space,
|
||||
)
|
||||
from service_app_test.test_application.migrate_old_data.company import migrate_company
|
||||
from service_app_test.test_application.migrate_old_data.accounts import migrate_account_records
|
||||
from service_app_test.test_application.migrate_old_data.accounts import (
|
||||
migrate_account_records,
|
||||
)
|
||||
|
||||
|
||||
password_token = "CDWs5ASBD4LVbmhNeilKSqBLKjKKt0odOL9h6NY082xqwln7Bo1opvC12j07iP8Gx-vpJSpF5nqUWs-Q9klQUJ6uLc8vuPmVKYVCXE0nz2yU_xyFGOrlqrVro1FSZG1EXwWopuLA_gKH5qkiiQwI1tM3UDFLJjbnR4xjwnH4m6RHe0gYKOZbpkd-uxFxzYbw"
|
||||
password_token = ""
|
||||
login_data = {
|
||||
"domain": "evyos.com.tr",
|
||||
"access_key": "karatay.berkay.sup@evyos.com.tr",
|
||||
"password": "string",
|
||||
"remember_me": False,
|
||||
"password_token": password_token
|
||||
"password_token": password_token,
|
||||
}
|
||||
login_data_wag = {
|
||||
"domain": "evyos.com.tr",
|
||||
"access_key": "karatay.berkay.sup@evyos.com.tr",
|
||||
"password": "string",
|
||||
"remember_me": False,
|
||||
"password_token": "",
|
||||
}
|
||||
|
||||
login_creds_employee = {
|
||||
"domain": "evyos.com.tr",
|
||||
"access_key": "karatay.berkay.sup@evyos.com.tr",
|
||||
"password": "string",
|
||||
"remember_me": False,
|
||||
"password_token": "z5nPguDu6PrY_94KlTGxGBCMcK6rZcDl5AGqO5aHWY7TcQF8LJGYikMQs9labvqdz5yM7vE_f8Zq_vqp00o3EnWwWCWhel-EsMcAujBKNRjV3jC_4xk0_1r_unIYogWAjz_spZipX6pncsch2ngvv0dpx4lHSiZ5QrDTA1RefQ",
|
||||
"password_token": password_token,
|
||||
}
|
||||
access_key_president = "bmanco@example.net"
|
||||
access_key_president = "mehmet.karatay@hotmail.com"
|
||||
login_creds_occupant = {
|
||||
"domain": "evyos.com.tr",
|
||||
"access_key": access_key_president,
|
||||
"password": "string",
|
||||
"remember_me": False,
|
||||
"password_token": "o_2Y_yXS-cl6MxLbzLrXQetXTlDLD3UBDTQNa_mBMyzSOVIgx3LGbnufLRJjd4g6BWFbwVgJIUxbK-Pi0R5dwxfVJKyoEeDdej40uRHSsElKR16nvnqgFB_BJ4nmyN0KSunZHra5NqHJor17EGExOSmlttZV5dC7vFsrc-GUkg",
|
||||
"password_token": "n6CCVhj0gvEqENWhA7OqG1NNczJWPuPgI2U6G9yE_OS8gIYGkFhqsZ9c0K9He7yx7O7T9zgaj7ZDxb1JVKzTnGIGrpv8mDdOhuB0IV20XsTsir_jzzHspXsrcHDLk6l32_qsI4fLswDPjY0qvB1yqnEjRvHuYGhfPYTifwfax2O2ceNwwYoTFU9P2s4eWzDb"
|
||||
}
|
||||
wrt_creds_occupant = {
|
||||
"domain": "evyos.com.tr",
|
||||
@@ -55,59 +53,83 @@ wrt_creds_occupant = {
|
||||
"password_token": "",
|
||||
}
|
||||
|
||||
wag_api = RequestToApi()
|
||||
wag_api.overwrite_base_url(base_url=WagAPI.base_url)
|
||||
wag_api.selected_object = wag_api.login_via_email_and_password(
|
||||
login_data=login_data_wag, is_password_valid=True
|
||||
)
|
||||
# wag_api = RequestToApi()
|
||||
# wag_api.overwrite_base_url(base_url=WagAPI.base_url)
|
||||
# wag_api.selected_object = wag_api.login_via_email_and_password(
|
||||
# login_data=login_data_wag, is_password_valid=True
|
||||
# )
|
||||
|
||||
local_api = RequestToApi()
|
||||
local_api.overwrite_base_url(base_url=LocalAPI.base_url)
|
||||
local_api.selected_object = local_api.login_via_email_and_password(
|
||||
login_data=login_data, is_password_valid=False
|
||||
)
|
||||
|
||||
|
||||
both_apis = BothAPIS()
|
||||
both_apis.wag_api = wag_api
|
||||
# both_apis.wag_api = wag_api
|
||||
both_apis.local_api = local_api
|
||||
|
||||
do_migrates = False
|
||||
assign_people_to_create_item = -1
|
||||
assign_people_to_create_item = 2
|
||||
|
||||
# selection_list = None
|
||||
selection_list = []
|
||||
selection_list = [
|
||||
"98f1207d-f241-4cb8-a95a-b51266632cc8",
|
||||
"a8eaf383-7bb6-489b-b9e8-f19f9fd1c197",
|
||||
]
|
||||
# selection_list = None
|
||||
manager_token = ""
|
||||
manager_token = "9TdLKsYaGIrDQrKHnB13SZ5Z7XIjvGRquMBXu4om5z30hKXIH7J55Q"
|
||||
writers_token = manager_token
|
||||
people_uu_id_list = []
|
||||
list_of_attendees = []
|
||||
people_uu_id_list = [
|
||||
"af411e80-29ad-4540-9e74-3c805700f461",
|
||||
"af411e80-29ad-4540-9e74-3c805700f461",
|
||||
"af411e80-29ad-4540-9e74-3c805700f461",
|
||||
]
|
||||
list_of_attendees = [
|
||||
"Qsf0XO6c-wTZDhACY66S4Ck21fgW-6E0f1dSi61bSskMAI7qUTH2Eg",
|
||||
"fjAc8_mktkBw46islaa8H1yM5jptwLcsdDbNz_MuH7gPmZtuNZ4zLw",
|
||||
"JwVbDMl6CQZTIFu4LEwdEaX8BB6syWPgygF0f3M0fiu9VhPaqdLzfw",
|
||||
"PFBj2hlhRAFxrxpUMCpE0O_kwKrWvTov4Zxn94MMnYcVMzC1kQNmiQ",
|
||||
"e8MKAguhQnSyuZtL1UVP4a3xx0zbXGEmLUQrbCEJu15VoO0r33otdA",
|
||||
"VPmcs0xD3N5RUGDyYRCe-adgvspkhiMb5YWfr7oN8fCvcQq9BTLSkA",
|
||||
"3xtEg2r1qi8PozE2Qte4fFuz2EjARP8uxRRS18nz6_OFGQ142rZk4g",
|
||||
"89XH0UXxbujs-uKxBMV8fZEMJkBDnxOr_8ZBbxS7isGD2noY_OpI4w",
|
||||
"jSb8rH1ZI7BSHYUtBsKsOoTW4LnHDY2JlJhid_YgpIg05CI-veX0fA",
|
||||
"fMysLzIehzVfYlnqcyPLpaAKaxD8IODe5QXmWbiM1gEVYtUMyTg-xw",
|
||||
"aS5AydqghcvTGMQHGpi3m9C5OgyQQ_Yyc_jnkNUzrBvuEuNGOgMgPA",
|
||||
]
|
||||
living_space_data = dict(
|
||||
build_parts_uu_id="98f1207d-f241-4cb8-a95a-b51266632cc8",
|
||||
person_uu_id="07a14d03-d8c8-4d84-9f71-ff81b732b030",
|
||||
occupant_type_uu_id="a8eaf383-7bb6-489b-b9e8-f19f9fd1c197",
|
||||
expiry_starts=arrow.now().date().__str__(),
|
||||
)
|
||||
|
||||
|
||||
if do_migrates:
|
||||
if assign_people_to_create_item == -1:
|
||||
local_api.selected_object = local_api.login_via_email_and_password(
|
||||
login_data=login_data, is_password_valid=False
|
||||
)
|
||||
migrate_company(requester=both_apis)
|
||||
migrate_people(requester=both_apis)
|
||||
migrate_build(requester=both_apis)
|
||||
migrate_build_living_space(requester=both_apis)
|
||||
migrate_account_records(requester=both_apis)
|
||||
# migrate_account_records(requester=both_apis)
|
||||
|
||||
|
||||
if assign_people_to_create_item == 0:
|
||||
# local_api.post(
|
||||
# endpoint="/building/living_space/create",
|
||||
# data=dict(
|
||||
# build_parts_uu_id="b23d32d2-e80c-4ca4-8d4a-bae6f710608c",
|
||||
# person_uu_id="cf47be44-ec58-4585-be41-178160be5b7e",
|
||||
# occupant_type_uu_id="30512a47-1b3e-4602-ac1a-75fcabb076b4",
|
||||
# expiry_starts=arrow.now().date().__str__(),
|
||||
# )
|
||||
# )
|
||||
if not bool(selection_list):
|
||||
local_api.selected_object = local_api.login_via_email_and_password(
|
||||
login_data=login_data, is_password_valid=True
|
||||
)
|
||||
response = local_api.post(endpoint="/building/living_space/create", data=living_space_data)
|
||||
print('response', response.text)
|
||||
|
||||
local_api.selected_object = local_api.login_via_email_and_password(
|
||||
login_data=login_creds_occupant,
|
||||
is_password_valid=False,
|
||||
is_password_valid=bool(selection_list),
|
||||
selection_list=selection_list,
|
||||
)
|
||||
selected_decision_book_uu_id = run_decision_book_depends(requester=both_apis.local_api)
|
||||
selected_decision_book_uu_id = run_decision_book_depends(
|
||||
requester=both_apis.local_api
|
||||
)
|
||||
send_invitation = {
|
||||
"build_decision_book_uu_id": selected_decision_book_uu_id,
|
||||
"message": "Request for a Regular Building Meeting",
|
||||
@@ -116,29 +138,119 @@ if assign_people_to_create_item == 0:
|
||||
send_invitation_to_building_residents(
|
||||
send_invitation_dict=send_invitation, requester=both_apis.local_api
|
||||
)
|
||||
if assign_people_to_create_item == 1:
|
||||
count = 17
|
||||
elif assign_people_to_create_item == 1:
|
||||
local_api.selected_object = local_api.login_via_email_and_password(
|
||||
login_data=login_creds_occupant,
|
||||
is_password_valid=True,
|
||||
selection_list=selection_list,
|
||||
)
|
||||
count = 7
|
||||
list_of_attendees.insert(0, manager_token)
|
||||
collect_invitation_to_building_residents(
|
||||
attended_dict_list=list_of_attendees, attend_count=count + 1,
|
||||
requester=both_apis.local_api
|
||||
attended_dict_list=list_of_attendees,
|
||||
attend_count=count + 1,
|
||||
requester=both_apis.local_api,
|
||||
)
|
||||
elif assign_people_to_create_item == 2:
|
||||
local_api.selected_object = local_api.login_via_email_and_password(
|
||||
login_data=login_creds_occupant,
|
||||
is_password_valid=True,
|
||||
selection_list=selection_list,
|
||||
)
|
||||
assign_people_to_pre_or_wrt(
|
||||
person_uu_id=people_uu_id_list[0],
|
||||
manager_token=manager_token,
|
||||
occupant_code="MT-VPR",
|
||||
requester=both_apis.local_api
|
||||
requester=both_apis.local_api,
|
||||
)
|
||||
assign_people_to_pre_or_wrt(
|
||||
person_uu_id=people_uu_id_list[1],
|
||||
manager_token=manager_token,
|
||||
occupant_code="MT-WRT",
|
||||
requester=both_apis.local_api
|
||||
requester=both_apis.local_api,
|
||||
)
|
||||
assign_people_to_pre_or_wrt(
|
||||
person_uu_id=people_uu_id_list[2],
|
||||
manager_token=manager_token,
|
||||
occupant_code="MT-PRS",
|
||||
requester=both_apis.local_api,
|
||||
)
|
||||
elif assign_people_to_create_item == 3:
|
||||
local_api.selected_object = local_api.login_via_email_and_password(
|
||||
login_data=wrt_creds_occupant,
|
||||
is_password_valid=True,
|
||||
selection_list=selection_list,
|
||||
)
|
||||
selected_decision_book_uu_id = list_decision_books(requester=both_apis.local_api)["data"][0]["uu_id"]
|
||||
print("select_company_uu_id", local_api.selected_object)
|
||||
is_fixed_price = False
|
||||
|
||||
info_type_d_uu_id = get_type_codes_key_and_class(
|
||||
class_name="BuildDuesTypes", key_name="BDT-D", requester=both_apis.local_api
|
||||
)["data"]["uu_id"]
|
||||
unit_price = 15.90
|
||||
run_decision_book_items(
|
||||
writers_token=writers_token,
|
||||
unit_price=unit_price,
|
||||
is_fixed=is_fixed_price,
|
||||
info_type_uu_id=info_type_d_uu_id,
|
||||
requester=both_apis.local_api
|
||||
)
|
||||
is_fixed_price = True
|
||||
|
||||
info_type_a_uu_id = get_type_codes_key_and_class(
|
||||
class_name="BuildDuesTypes", key_name="BDT-A", requester=both_apis.local_api
|
||||
)["data"]["uu_id"]
|
||||
start_date, end_date = "2024-11-01", "2025-02-01"
|
||||
unit_price = 850
|
||||
run_decision_book_items(
|
||||
writers_token=writers_token,
|
||||
unit_price=unit_price,
|
||||
is_fixed=is_fixed_price,
|
||||
info_type_uu_id=info_type_a_uu_id,
|
||||
start_date=start_date,
|
||||
end_date=end_date,
|
||||
requester=both_apis.local_api
|
||||
)
|
||||
|
||||
info_type_a_uu_id = get_type_codes_key_and_class(
|
||||
class_name="BuildDuesTypes", key_name="BDT-R", requester=both_apis.local_api
|
||||
)["data"]["uu_id"]
|
||||
unit_price = 5000
|
||||
run_decision_book_items(
|
||||
writers_token=writers_token,
|
||||
unit_price=unit_price,
|
||||
is_fixed=is_fixed_price,
|
||||
info_type_uu_id=info_type_a_uu_id,
|
||||
start_date=start_date,
|
||||
end_date=end_date,
|
||||
requester=both_apis.local_api
|
||||
)
|
||||
|
||||
info_type_a_uu_id = get_type_codes_key_and_class(
|
||||
class_name="BuildDuesTypes", key_name="BDT-R", requester=both_apis.local_api
|
||||
)["data"]["uu_id"]
|
||||
unit_price = 2000
|
||||
run_decision_book_items(
|
||||
writers_token=writers_token,
|
||||
unit_price=unit_price,
|
||||
is_fixed=is_fixed_price,
|
||||
info_type_uu_id=info_type_a_uu_id,
|
||||
start_date=start_date,
|
||||
end_date=end_date,
|
||||
requester=both_apis.local_api
|
||||
)
|
||||
|
||||
info_type_a_uu_id = get_type_codes_key_and_class(
|
||||
class_name="BuildDuesTypes", key_name="BDT-L", requester=both_apis.local_api
|
||||
)["data"]["uu_id"]
|
||||
unit_price = 750
|
||||
run_decision_book_items(
|
||||
writers_token=writers_token,
|
||||
unit_price=unit_price,
|
||||
is_fixed=is_fixed_price,
|
||||
info_type_uu_id=info_type_a_uu_id,
|
||||
start_date=start_date,
|
||||
end_date=end_date,
|
||||
requester=both_apis.local_api
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user