svc-infra 0.1.580__py3-none-any.whl → 0.1.581__py3-none-any.whl

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.

Potentially problematic release.


This version of svc-infra might be problematic. Click here for more details.

@@ -920,6 +920,7 @@ def build_payments_routers(prefix: str = "/payments") -> list[DualAPIRouter]:
920
920
  @prot.delete(
921
921
  "/invoices/{provider_invoice_id}/lines/{provider_line_item_id}",
922
922
  name="payments_delete_invoice_line_item",
923
+ summary="Delete Invoice Line Item (draft invoices only)",
923
924
  response_model=InvoiceOut,
924
925
  dependencies=[Depends(require_idempotency_key)],
925
926
  )
@@ -928,20 +929,48 @@ def build_payments_routers(prefix: str = "/payments") -> list[DualAPIRouter]:
928
929
  provider_line_item_id: str,
929
930
  svc: PaymentsService = Depends(get_service),
930
931
  ):
932
+ """
933
+ Removes a line item from a DRAFT invoice only. For finalized invoices,
934
+ use `void` or `credit` flows instead.
935
+ """
931
936
  out = await svc.delete_invoice_line_item(provider_invoice_id, provider_line_item_id)
932
937
  await svc.session.flush()
933
938
  return out
934
939
 
935
- # --- Optional REST alias for detach (calls your existing logic) ---
940
+ # --- Canonical: remove local alias/association (non-destructive) ---
936
941
  @prot.delete(
937
- "/methods/{provider_method_id}",
942
+ "/method_aliases/{alias_id}",
938
943
  name="payments_delete_method_alias",
944
+ summary="Remove Method Alias (non-destructive)",
945
+ response_model=PaymentMethodOut,
946
+ dependencies=[Depends(require_idempotency_key)],
947
+ )
948
+ async def delete_method_alias(alias_id: str, svc: PaymentsService = Depends(get_service)):
949
+ """
950
+ Removes the local alias/association to a payment method.
951
+ This does **not** delete the underlying payment method at the provider.
952
+ Equivalent to `detach_payment_method`.
953
+ """
954
+ out = await svc.detach_payment_method(alias_id)
955
+ await svc.session.flush()
956
+ return out
957
+
958
+ # --- Back-compat shim (deprecated): keep old path but mark deprecated ---
959
+ @prot.delete(
960
+ "/methods/{provider_method_id}",
961
+ name="payments_delete_method_alias_deprecated",
962
+ summary="(Deprecated) Remove Method Alias — use /method_aliases/{alias_id}",
963
+ deprecated=True,
939
964
  response_model=PaymentMethodOut,
940
965
  dependencies=[Depends(require_idempotency_key)],
941
966
  )
942
- async def delete_method_alias(
967
+ async def delete_method_alias_deprecated(
943
968
  provider_method_id: str, svc: PaymentsService = Depends(get_service)
944
969
  ):
970
+ """
971
+ DEPRECATED: use DELETE /method_aliases/{alias_id} instead.
972
+ Non-destructive; only removes local alias/association.
973
+ """
945
974
  out = await svc.detach_payment_method(provider_method_id)
946
975
  await svc.session.flush()
947
976
  return out
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: svc-infra
3
- Version: 0.1.580
3
+ Version: 0.1.581
4
4
  Summary: Infrastructure for building and deploying prod-ready services
5
5
  License: MIT
6
6
  Keywords: fastapi,sqlalchemy,alembic,auth,infra,async,pydantic
@@ -12,7 +12,7 @@ svc_infra/apf_payments/settings.py,sha256=VnNQbajbv843buUisqa82xOQ-f5JA8JzHD8o01
12
12
  svc_infra/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  svc_infra/api/fastapi/__init__.py,sha256=VVdQjak74_wTDqmvL05_C97vIFugQxPVU-3JQEFBgR8,747
14
14
  svc_infra/api/fastapi/apf_payments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- svc_infra/api/fastapi/apf_payments/router.py,sha256=zwdAVaUYGT3RjIp-3WtWUMsuBWGPhjt6fAMGt2tZXlg,32456
15
+ svc_infra/api/fastapi/apf_payments/router.py,sha256=GRBdpJpTG05uJhHMj2lDhf15lcn0nas1KFLnLlDVKaI,33722
16
16
  svc_infra/api/fastapi/apf_payments/setup.py,sha256=PX-LHDiyu2eDuaw2m98VPUkF6EmXXRkbjRqh_gL8Kls,2263
17
17
  svc_infra/api/fastapi/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  svc_infra/api/fastapi/auth/_cookies.py,sha256=U4heUmMnLezHx8U6ksuUEpSZ6sNMJcIO0gdLpmZ5FXw,1367
@@ -228,7 +228,7 @@ svc_infra/obs/templates/sidecars/railway/__init__.py,sha256=47DEQpj8HBSa-_TImW-5
228
228
  svc_infra/obs/templates/sidecars/railway/agent.yaml,sha256=hYv35yG92XEP_4joMFmMcVTD-4fG_zHitmChjreUJh4,516
229
229
  svc_infra/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
230
230
  svc_infra/utils.py,sha256=VX1yjTx61-YvAymyRhGy18DhybiVdPddiYD_FlKTbJU,952
231
- svc_infra-0.1.580.dist-info/METADATA,sha256=IHm9XHfQc8WdbmNpAyFDv0H1fLOIX2LMX0D7KRsmXe0,3487
232
- svc_infra-0.1.580.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
233
- svc_infra-0.1.580.dist-info/entry_points.txt,sha256=6x_nZOsjvn6hRZsMgZLgTasaCSKCgAjsGhACe_CiP0U,48
234
- svc_infra-0.1.580.dist-info/RECORD,,
231
+ svc_infra-0.1.581.dist-info/METADATA,sha256=R0-tDGtxo9Lfoso3tlUUrYGN0u4sEfEYheTfjYchuF8,3487
232
+ svc_infra-0.1.581.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
233
+ svc_infra-0.1.581.dist-info/entry_points.txt,sha256=6x_nZOsjvn6hRZsMgZLgTasaCSKCgAjsGhACe_CiP0U,48
234
+ svc_infra-0.1.581.dist-info/RECORD,,