Skip to content

Commit fc3e534

Browse files
committed
feat(converter): create RC-SR CISU converter
1 parent 5dc93e3 commit fc3e534

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from typing import Dict, Any
2+
3+
from converter.cisu.base_cisu_converter import BaseCISUConverter
4+
5+
6+
class ResourcesStatusConverter(BaseCISUConverter):
7+
@classmethod
8+
def get_rs_message_type(cls) -> str:
9+
return "resourcesStatus"
10+
11+
@classmethod
12+
def get_cisu_message_type(cls) -> str:
13+
return "resourcesStatusCisu"
14+
15+
@classmethod
16+
def from_rs_to_cisu(cls, edxl_json) -> Dict[str, Any]:
17+
output_json = cls.copy_rs_input_content(edxl_json)
18+
output_use_case_json = cls.copy_rs_input_use_case_content(edxl_json)
19+
return cls.format_cisu_output_json(output_json, output_use_case_json)
20+
21+
@classmethod
22+
def from_cisu_to_rs(cls, edxl_json: Dict[str, Any]) -> Dict[str, Any]:
23+
output_json = cls.copy_cisu_input_content(edxl_json)
24+
output_use_case_json = cls.copy_cisu_input_use_case_content(edxl_json)
25+
return cls.format_rs_output_json(output_json, output_use_case_json)

0 commit comments

Comments
 (0)