boarddata 6.4.2__tar.gz → 6.5.1__tar.gz

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.
Files changed (60) hide show
  1. {boarddata-6.4.2 → boarddata-6.5.1}/PKG-INFO +1 -1
  2. {boarddata-6.4.2 → boarddata-6.5.1}/__init__.py +1 -1
  3. {boarddata-6.4.2 → boarddata-6.5.1}/_comex.py +149 -0
  4. {boarddata-6.4.2 → boarddata-6.5.1}/boarddata.egg-info/PKG-INFO +1 -1
  5. {boarddata-6.4.2 → boarddata-6.5.1}/pyproject.toml +1 -1
  6. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_comex.py +31 -0
  7. {boarddata-6.4.2 → boarddata-6.5.1}/CLAUDE.md +0 -0
  8. {boarddata-6.4.2 → boarddata-6.5.1}/README.md +0 -0
  9. {boarddata-6.4.2 → boarddata-6.5.1}/_assemblies.py +0 -0
  10. {boarddata-6.4.2 → boarddata-6.5.1}/_auditors.py +0 -0
  11. {boarddata-6.4.2 → boarddata-6.5.1}/_base.py +0 -0
  12. {boarddata-6.4.2 → boarddata-6.5.1}/_companies.py +0 -0
  13. {boarddata-6.4.2 → boarddata-6.5.1}/_criteria.py +0 -0
  14. {boarddata-6.4.2 → boarddata-6.5.1}/_directors.py +0 -0
  15. {boarddata-6.4.2 → boarddata-6.5.1}/_documents.py +0 -0
  16. {boarddata-6.4.2 → boarddata-6.5.1}/_esg.py +0 -0
  17. {boarddata-6.4.2 → boarddata-6.5.1}/_indexes.py +0 -0
  18. {boarddata-6.4.2 → boarddata-6.5.1}/_persons.py +0 -0
  19. {boarddata-6.4.2 → boarddata-6.5.1}/_sentinel.py +0 -0
  20. {boarddata-6.4.2 → boarddata-6.5.1}/_utilities.py +0 -0
  21. {boarddata-6.4.2 → boarddata-6.5.1}/boarddata.egg-info/SOURCES.txt +0 -0
  22. {boarddata-6.4.2 → boarddata-6.5.1}/boarddata.egg-info/dependency_links.txt +0 -0
  23. {boarddata-6.4.2 → boarddata-6.5.1}/boarddata.egg-info/requires.txt +0 -0
  24. {boarddata-6.4.2 → boarddata-6.5.1}/boarddata.egg-info/top_level.txt +0 -0
  25. {boarddata-6.4.2 → boarddata-6.5.1}/cache.py +0 -0
  26. {boarddata-6.4.2 → boarddata-6.5.1}/client.py +0 -0
  27. {boarddata-6.4.2 → boarddata-6.5.1}/errors.py +0 -0
  28. {boarddata-6.4.2 → boarddata-6.5.1}/py.typed +0 -0
  29. {boarddata-6.4.2 → boarddata-6.5.1}/setup.cfg +0 -0
  30. {boarddata-6.4.2 → boarddata-6.5.1}/tests/__init__.py +0 -0
  31. {boarddata-6.4.2 → boarddata-6.5.1}/tests/conftest.py +0 -0
  32. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_assemblies.py +0 -0
  33. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_auditors.py +0 -0
  34. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_base.py +0 -0
  35. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_build_payload.py +0 -0
  36. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_cache.py +0 -0
  37. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_companies.py +0 -0
  38. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_config.py +0 -0
  39. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_criteria.py +0 -0
  40. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_directors.py +0 -0
  41. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_documents.py +0 -0
  42. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_esg.py +0 -0
  43. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_exports.py +0 -0
  44. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_indexes.py +0 -0
  45. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_persons.py +0 -0
  46. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_sentinel.py +0 -0
  47. {boarddata-6.4.2 → boarddata-6.5.1}/tests/test_utilities.py +0 -0
  48. {boarddata-6.4.2 → boarddata-6.5.1}/types/__init__.py +0 -0
  49. {boarddata-6.4.2 → boarddata-6.5.1}/types/assemblies.py +0 -0
  50. {boarddata-6.4.2 → boarddata-6.5.1}/types/auditors.py +0 -0
  51. {boarddata-6.4.2 → boarddata-6.5.1}/types/comex.py +0 -0
  52. {boarddata-6.4.2 → boarddata-6.5.1}/types/companies.py +0 -0
  53. {boarddata-6.4.2 → boarddata-6.5.1}/types/core.py +0 -0
  54. {boarddata-6.4.2 → boarddata-6.5.1}/types/criteria.py +0 -0
  55. {boarddata-6.4.2 → boarddata-6.5.1}/types/directors.py +0 -0
  56. {boarddata-6.4.2 → boarddata-6.5.1}/types/documents.py +0 -0
  57. {boarddata-6.4.2 → boarddata-6.5.1}/types/esg.py +0 -0
  58. {boarddata-6.4.2 → boarddata-6.5.1}/types/indexes.py +0 -0
  59. {boarddata-6.4.2 → boarddata-6.5.1}/types/persons.py +0 -0
  60. {boarddata-6.4.2 → boarddata-6.5.1}/types/sentinel.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boarddata
3
- Version: 6.4.2
3
+ Version: 6.5.1
4
4
  Summary: Python SDK for the BoardData V2 REST API
5
5
  License: MIT
6
6
  Classifier: Development Status :: 4 - Beta
@@ -6,7 +6,7 @@ from .cache import FileTokenCache, ScalewaySecretTokenCache
6
6
  from .client import BoardDataClient
7
7
  from .errors import BoardDataError, ExportTooLargeError
8
8
 
9
- __version__ = "6.4.2"
9
+ __version__ = "6.5.1"
10
10
  __all__ = [
11
11
  "Base",
12
12
  "BoardDataClient",
@@ -455,6 +455,155 @@ class ComexMixin:
455
455
  )
456
456
  return self._post(f"comex/{comex_uid}/compensations/", payload) # type: ignore[attr-defined]
457
457
 
458
+ def replace_comex_compensation(
459
+ self,
460
+ comex_uid: str,
461
+ fiscal_year: int,
462
+ nature: str,
463
+ *,
464
+ assembly: str | None = None,
465
+ fixed: str | None = None,
466
+ variable: str | None = None,
467
+ exceptional: str | None = None,
468
+ benefits_in_kind: str | None = None,
469
+ stock_options: str | None = None,
470
+ performance_shares: str | None = None,
471
+ other_long_term: str | None = None,
472
+ retirement_benefit: str | None = None,
473
+ retirement_contribution: str | None = None,
474
+ severance: str | None = None,
475
+ golden_hello: str | None = None,
476
+ fixed_paid: str | None = None,
477
+ variable_paid: str | None = None,
478
+ exceptional_paid: str | None = None,
479
+ benefits_in_kind_paid: str | None = None,
480
+ stock_options_paid: str | None = None,
481
+ performance_shares_paid: str | None = None,
482
+ other_long_term_paid: str | None = None,
483
+ severance_paid: str | None = None,
484
+ retirement_benefit_paid: str | None = None,
485
+ retirement_contribution_paid: str | None = None,
486
+ golden_hello_paid: str | None = None,
487
+ exercised_options: str | None = None,
488
+ performance_shares_number: int | None = None,
489
+ pay_ratio_average: str | None = None,
490
+ pay_ratio_median: str | None = None,
491
+ pay_ratio_method: str | None = None,
492
+ non_compete_compensation: str | None = None,
493
+ non_compete: bool | None = None,
494
+ clawback: bool | None = None,
495
+ unemployment_insurance: bool | None = None,
496
+ holding: bool | None = None,
497
+ has_employment_contract: bool | None = None,
498
+ discretionary_grant: bool | None = None,
499
+ subsidiary_remuneration: str | None = None,
500
+ remuneration_via_holding: bool | None = None,
501
+ currency: str | None = None,
502
+ field_sources: list[FieldSourcePayload] | None = None,
503
+ criteria: list[dict[str, Any]] | None = None,
504
+ component_achievement_rates: list[dict[str, Any]] | None = None,
505
+ ) -> dict[str, Any]:
506
+ """Replace (clean-swap) a compensation entry for a comex mandate.
507
+
508
+ Args:
509
+ comex_uid: Comex mandate UUID.
510
+ fiscal_year: Fiscal year.
511
+ nature: Compensation nature (``"REAL"`` or ``"POLITIC"``).
512
+ assembly: Assembly UUID.
513
+ fixed: Fixed compensation (decimal).
514
+ variable: Variable compensation (decimal).
515
+ exceptional: Exceptional compensation (decimal).
516
+ benefits_in_kind: Benefits in kind (decimal).
517
+ stock_options: Stock options value (decimal).
518
+ performance_shares: Performance shares value (decimal).
519
+ other_long_term: Other long-term compensation (decimal).
520
+ retirement_benefit: Retirement benefit (decimal).
521
+ retirement_contribution: Retirement contribution (decimal).
522
+ severance: Severance (decimal).
523
+ golden_hello: Golden hello (decimal).
524
+ fixed_paid: Fixed paid (decimal).
525
+ variable_paid: Variable paid (decimal).
526
+ exceptional_paid: Exceptional paid (decimal).
527
+ benefits_in_kind_paid: Benefits in kind paid (decimal).
528
+ stock_options_paid: Stock options paid (decimal).
529
+ performance_shares_paid: Performance shares paid (decimal).
530
+ other_long_term_paid: Other long-term paid (decimal).
531
+ severance_paid: Severance paid (decimal).
532
+ retirement_benefit_paid: Retirement benefit paid (decimal).
533
+ retirement_contribution_paid: Retirement contribution paid (decimal).
534
+ golden_hello_paid: Golden hello paid (decimal).
535
+ exercised_options: Exercised options value (decimal).
536
+ performance_shares_number: Number of performance shares.
537
+ pay_ratio_average: Average pay ratio (decimal).
538
+ pay_ratio_median: Median pay ratio (decimal).
539
+ pay_ratio_method: Pay ratio calculation method.
540
+ non_compete_compensation: Non-compete compensation (decimal).
541
+ non_compete: Whether non-compete clause applies.
542
+ clawback: Whether clawback clause applies.
543
+ unemployment_insurance: Whether unemployment insurance applies.
544
+ holding: Whether holding applies.
545
+ has_employment_contract: Whether has employment contract.
546
+ discretionary_grant: Whether discretionary grant applies.
547
+ subsidiary_remuneration: Subsidiary remuneration (decimal).
548
+ remuneration_via_holding: Whether remuneration is provided via holding.
549
+ currency: Currency code (e.g. ``"EUR"``).
550
+ field_sources: Document provenance for fields.
551
+ criteria: List of compensation criteria dicts.
552
+ component_achievement_rates: List of achievement rate dicts.
553
+
554
+ Returns:
555
+ dict with {"id", "action"} where action is "replaced" (a prior live row existed) or "created" (none existed).
556
+
557
+ Raises:
558
+ BoardDataError: On non-2xx API response.
559
+ """
560
+ payload = self._build_payload( # type: ignore[attr-defined]
561
+ fiscal_year=fiscal_year,
562
+ nature=nature,
563
+ assembly=assembly,
564
+ fixed=fixed,
565
+ variable=variable,
566
+ exceptional=exceptional,
567
+ benefits_in_kind=benefits_in_kind,
568
+ stock_options=stock_options,
569
+ performance_shares=performance_shares,
570
+ other_long_term=other_long_term,
571
+ retirement_benefit=retirement_benefit,
572
+ retirement_contribution=retirement_contribution,
573
+ severance=severance,
574
+ golden_hello=golden_hello,
575
+ fixed_paid=fixed_paid,
576
+ variable_paid=variable_paid,
577
+ exceptional_paid=exceptional_paid,
578
+ benefits_in_kind_paid=benefits_in_kind_paid,
579
+ stock_options_paid=stock_options_paid,
580
+ performance_shares_paid=performance_shares_paid,
581
+ other_long_term_paid=other_long_term_paid,
582
+ severance_paid=severance_paid,
583
+ retirement_benefit_paid=retirement_benefit_paid,
584
+ retirement_contribution_paid=retirement_contribution_paid,
585
+ golden_hello_paid=golden_hello_paid,
586
+ exercised_options=exercised_options,
587
+ performance_shares_number=performance_shares_number,
588
+ pay_ratio_average=pay_ratio_average,
589
+ pay_ratio_median=pay_ratio_median,
590
+ pay_ratio_method=pay_ratio_method,
591
+ non_compete_compensation=non_compete_compensation,
592
+ non_compete=non_compete,
593
+ clawback=clawback,
594
+ unemployment_insurance=unemployment_insurance,
595
+ holding=holding,
596
+ has_employment_contract=has_employment_contract,
597
+ discretionary_grant=discretionary_grant,
598
+ subsidiary_remuneration=subsidiary_remuneration,
599
+ remuneration_via_holding=remuneration_via_holding,
600
+ currency=currency,
601
+ field_sources=field_sources,
602
+ criteria=criteria,
603
+ component_achievement_rates=component_achievement_rates,
604
+ )
605
+ return self._post(f"comex/{comex_uid}/compensations/replace/", payload) # type: ignore[attr-defined]
606
+
458
607
  def update_comex_compensation(
459
608
  self,
460
609
  comex_uid: str,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boarddata
3
- Version: 6.4.2
3
+ Version: 6.5.1
4
4
  Summary: Python SDK for the BoardData V2 REST API
5
5
  License: MIT
6
6
  Classifier: Development Status :: 4 - Beta
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "boarddata"
7
- version = "6.4.2"
7
+ version = "6.5.1"
8
8
  description = "Python SDK for the BoardData V2 REST API"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -128,3 +128,34 @@ class TestListBulkComexCompensations:
128
128
  c.list_bulk_comex_compensations(company="uuid1", fiscal_year=2024)
129
129
  args, kwargs = c._request.call_args
130
130
  assert args == ("GET", "comex/compensations/")
131
+
132
+
133
+ class TestReplaceComexCompensation:
134
+ def test_posts_to_replace_url_with_explicit_fields(self):
135
+ c = make_client()
136
+ c._request.return_value = {"id": "comp9", "action": "replaced"}
137
+ result = c.replace_comex_compensation(
138
+ "comex-uuid",
139
+ 2024,
140
+ "REAL",
141
+ fixed="500000.00",
142
+ variable="200000.00",
143
+ currency="EUR",
144
+ )
145
+ # Exactly one HTTP call, and it must POST to the /replace/ tail.
146
+ assert c._request.call_count == 1
147
+ args, kwargs = c._request.call_args
148
+ assert args == ("POST", "comex/comex-uuid/compensations/replace/")
149
+ payload = kwargs["json"]
150
+ assert payload["fixed"] == "500000.00"
151
+ assert payload["variable"] == "200000.00"
152
+ assert payload["currency"] == "EUR"
153
+ assert payload["fiscal_year"] == 2024
154
+ assert payload["nature"] == "REAL"
155
+ assert result == {"id": "comp9", "action": "replaced"}
156
+
157
+ def test_returns_created_when_no_prior_row(self):
158
+ c = make_client()
159
+ c._request.return_value = {"id": "comp10", "action": "created"}
160
+ result = c.replace_comex_compensation("comex-uuid", 2024, "POLITIC", fixed="1.00")
161
+ assert result["action"] == "created"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes