| 456 | @classmethod |
| 457 | @handle_exceptions() |
| 458 | def commit( |
| 459 | cls, |
| 460 | *, |
| 461 | parameters: dict, |
| 462 | variant_slug: str, |
| 463 | # |
| 464 | app_id: Optional[str] = None, |
| 465 | app_slug: Optional[str] = None, |
| 466 | ): |
| 467 | variant_ref = SharedManager._ref_or_none( # type: ignore # type: ignore |
| 468 | slug=variant_slug, |
| 469 | version=None, |
| 470 | id=None, |
| 471 | ) |
| 472 | application_ref = SharedManager._ref_or_none( # type: ignore # type: ignore |
| 473 | slug=app_slug, |
| 474 | version=None, |
| 475 | id=app_id, |
| 476 | ) |
| 477 | config_response = ag.api.variants.configs_commit( # type: ignore |
| 478 | config=ConfigRequest( |
| 479 | params=parameters, |
| 480 | variant_ref=variant_ref.model_dump() if variant_ref else None, # type: ignore |
| 481 | application_ref=application_ref.model_dump() if application_ref else None, # type: ignore |
| 482 | ) |
| 483 | ) |
| 484 | |
| 485 | response = SharedManager._parse_config_response(config_response) |
| 486 | |
| 487 | return ConfigurationResponse(**response) |
| 488 | |
| 489 | @classmethod |
| 490 | @handle_exceptions() |