Files
skill-template/scripts/service/amazon_report_adapter/base.py
chendelian 4a0be93b4a
All checks were successful
技能自动化发布 / release (push) Successful in 5s
chore: auto release commit (2026-07-03 12:09:55)
2026-07-03 12:09:55 +08:00

35 lines
828 B
Python

"""Amazon 结算报表 adapter 基类与数据契约。"""
from __future__ import annotations
from dataclasses import dataclass, field
from typing import Any, Dict, Optional
@dataclass
class DownloadSettlementResult:
ok: bool
job_id: Optional[str]
file_path: Optional[str]
filename: Optional[str]
date_from: str
date_to: str
seller_code: Optional[str] = None
error_msg: Optional[str] = None
artifacts: Dict[str, Any] = field(default_factory=dict)
class DownloadSettlementAdapterBase:
name: str = "base"
def download_settlement(
self,
*,
date_from: str,
date_to: str,
seller_code: Optional[str] = None,
downloads_dir: str = "",
artifacts_dir: str = "",
) -> DownloadSettlementResult:
raise NotImplementedError