@@ -2773,6 +2773,63 @@ <h2 class="section-title" id="header-classes">Classes</h2>
27732773
27742774 return self.adapter._parse_response(raw_result, AcquireRightsResponse)
27752775
2776+ async def update_rights(
2777+ self,
2778+ request: UpdateRightsRequest,
2779+ ) -> TaskResult[UpdateRightsResponse]:
2780+ """Update terms of an existing rights acquisition.
2781+
2782+ Modifies a previously acquired rights record — typically to extend
2783+ the ``end_date``, raise the ``impression_cap``, pause/unpause via
2784+ ``paused``, or swap to a compatible ``pricing_option_id``. Partial
2785+ update: pass only the fields you want to change.
2786+
2787+ Failure modes (surface as ``TaskResult`` with ``success=False``):
2788+
2789+ * Acquisition is expired or revoked — the seller rejects the update
2790+ outright; mint a fresh ``acquire_rights`` instead.
2791+ * ``pricing_option_id`` swap to an incompatible option — rejected;
2792+ the new option's terms must be a strict superset / compatible
2793+ with the original acquisition.
2794+ * No partial-state mutations on rejection: the acquisition remains
2795+ at its prior state when any field fails validation.
2796+
2797+ Args:
2798+ request: Request with ``rights_id`` and at least one mutable
2799+ field (``end_date``, ``impression_cap``, ``paused``, or
2800+ ``pricing_option_id``).
2801+
2802+ Returns:
2803+ TaskResult containing UpdateRightsResponse (updated or error).
2804+ """
2805+ operation_id = create_operation_id()
2806+ params = request.model_dump(mode="json", exclude_none=True)
2807+
2808+ self._emit_activity(
2809+ Activity(
2810+ type=ActivityType.PROTOCOL_REQUEST,
2811+ operation_id=operation_id,
2812+ agent_id=self.agent_config.id,
2813+ task_type="update_rights",
2814+ timestamp=datetime.now(timezone.utc).isoformat(),
2815+ )
2816+ )
2817+
2818+ raw_result = await self.adapter.update_rights(params)
2819+
2820+ self._emit_activity(
2821+ Activity(
2822+ type=ActivityType.PROTOCOL_RESPONSE,
2823+ operation_id=operation_id,
2824+ agent_id=self.agent_config.id,
2825+ task_type="update_rights",
2826+ status=raw_result.status,
2827+ timestamp=datetime.now(timezone.utc).isoformat(),
2828+ )
2829+ )
2830+
2831+ return self.adapter._parse_response(raw_result, UpdateRightsResponse)
2832+
27762833 # ========================================================================
27772834 # V3 Protocol Methods - Compliance
27782835 # ========================================================================
@@ -3013,6 +3070,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
30133070 "get_brand_identity": GetBrandIdentityResponse,
30143071 "get_rights": GetRightsResponse,
30153072 "acquire_rights": AcquireRightsResponse,
3073+ "update_rights": UpdateRightsResponse,
30163074 # Compliance
30173075 "comply_test_controller": ComplyTestControllerResponse,
30183076 }
@@ -7323,6 +7381,96 @@ <h2 id="args">Args</h2>
73237381< h2 id ="returns "> Returns</ h2 >
73247382< p > TaskResult containing UpdatePropertyListResponse</ p > </ div >
73257383</ dd >
7384+ < dt id ="adcp.client.ADCPClient.update_rights "> < code class ="name flex ">
7385+ < span > async def < span class ="ident "> update_rights</ span > </ span > (< span > self, request: UpdateRightsRequest) ‑> < a title ="adcp.types.core.TaskResult " href ="types/core.html#adcp.types.core.TaskResult "> TaskResult</ a > [Union[UpdateRightsResponse1, UpdateRightsResponse2]]</ span >
7386+ </ code > </ dt >
7387+ < dd >
7388+ < details class ="source ">
7389+ < summary >
7390+ < span > Expand source code</ span >
7391+ </ summary >
7392+ < pre > < code class ="python "> async def update_rights(
7393+ self,
7394+ request: UpdateRightsRequest,
7395+ ) -> TaskResult[UpdateRightsResponse]:
7396+ """Update terms of an existing rights acquisition.
7397+
7398+ Modifies a previously acquired rights record — typically to extend
7399+ the ``end_date``, raise the ``impression_cap``, pause/unpause via
7400+ ``paused``, or swap to a compatible ``pricing_option_id``. Partial
7401+ update: pass only the fields you want to change.
7402+
7403+ Failure modes (surface as ``TaskResult`` with ``success=False``):
7404+
7405+ * Acquisition is expired or revoked — the seller rejects the update
7406+ outright; mint a fresh ``acquire_rights`` instead.
7407+ * ``pricing_option_id`` swap to an incompatible option — rejected;
7408+ the new option's terms must be a strict superset / compatible
7409+ with the original acquisition.
7410+ * No partial-state mutations on rejection: the acquisition remains
7411+ at its prior state when any field fails validation.
7412+
7413+ Args:
7414+ request: Request with ``rights_id`` and at least one mutable
7415+ field (``end_date``, ``impression_cap``, ``paused``, or
7416+ ``pricing_option_id``).
7417+
7418+ Returns:
7419+ TaskResult containing UpdateRightsResponse (updated or error).
7420+ """
7421+ operation_id = create_operation_id()
7422+ params = request.model_dump(mode="json", exclude_none=True)
7423+
7424+ self._emit_activity(
7425+ Activity(
7426+ type=ActivityType.PROTOCOL_REQUEST,
7427+ operation_id=operation_id,
7428+ agent_id=self.agent_config.id,
7429+ task_type="update_rights",
7430+ timestamp=datetime.now(timezone.utc).isoformat(),
7431+ )
7432+ )
7433+
7434+ raw_result = await self.adapter.update_rights(params)
7435+
7436+ self._emit_activity(
7437+ Activity(
7438+ type=ActivityType.PROTOCOL_RESPONSE,
7439+ operation_id=operation_id,
7440+ agent_id=self.agent_config.id,
7441+ task_type="update_rights",
7442+ status=raw_result.status,
7443+ timestamp=datetime.now(timezone.utc).isoformat(),
7444+ )
7445+ )
7446+
7447+ return self.adapter._parse_response(raw_result, UpdateRightsResponse)</ code > </ pre >
7448+ </ details >
7449+ < div class ="desc "> < p > Update terms of an existing rights acquisition.</ p >
7450+ < p > Modifies a previously acquired rights record — typically to extend
7451+ the < code > end_date</ code > , raise the < code > impression_cap</ code > , pause/unpause via
7452+ < code > paused</ code > , or swap to a compatible < code > pricing_option_id</ code > . Partial
7453+ update: pass only the fields you want to change.</ p >
7454+ < p > Failure modes (surface as < code > TaskResult</ code > with < code > success=False</ code > ):</ p >
7455+ < ul >
7456+ < li > Acquisition is expired or revoked — the seller rejects the update
7457+ outright; mint a fresh < code > acquire_rights</ code > instead.</ li >
7458+ < li > < code > pricing_option_id</ code > swap to an incompatible option — rejected;
7459+ the new option's terms must be a strict superset / compatible
7460+ with the original acquisition.</ li >
7461+ < li > No partial-state mutations on rejection: the acquisition remains
7462+ at its prior state when any field fails validation.</ li >
7463+ </ ul >
7464+ < h2 id ="args "> Args</ h2 >
7465+ < dl >
7466+ < dt > < strong > < code > request</ code > </ strong > </ dt >
7467+ < dd > Request with < code > rights_id</ code > and at least one mutable
7468+ field (< code > end_date</ code > , < code > impression_cap</ code > , < code > paused</ code > , or
7469+ < code > pricing_option_id</ code > ).</ dd >
7470+ </ dl >
7471+ < h2 id ="returns "> Returns</ h2 >
7472+ < p > TaskResult containing UpdateRightsResponse (updated or error).</ p > </ div >
7473+ </ dd >
73267474< dt id ="adcp.client.ADCPClient.use_idempotency_key "> < code class ="name flex ">
73277475< span > def < span class ="ident "> use_idempotency_key</ span > </ span > (< span > self, key: str) ‑> Iterator[str]</ span >
73287476</ code > </ dt >
@@ -7762,6 +7910,7 @@ <h4><code><a title="adcp.client.ADCPClient" href="#adcp.client.ADCPClient">ADCPC
77627910< li > < code > < a title ="adcp.client.ADCPClient.update_content_standards " href ="#adcp.client.ADCPClient.update_content_standards "> update_content_standards</ a > </ code > </ li >
77637911< li > < code > < a title ="adcp.client.ADCPClient.update_media_buy " href ="#adcp.client.ADCPClient.update_media_buy "> update_media_buy</ a > </ code > </ li >
77647912< li > < code > < a title ="adcp.client.ADCPClient.update_property_list " href ="#adcp.client.ADCPClient.update_property_list "> update_property_list</ a > </ code > </ li >
7913+ < li > < code > < a title ="adcp.client.ADCPClient.update_rights " href ="#adcp.client.ADCPClient.update_rights "> update_rights</ a > </ code > </ li >
77657914< li > < code > < a title ="adcp.client.ADCPClient.use_idempotency_key " href ="#adcp.client.ADCPClient.use_idempotency_key "> use_idempotency_key</ a > </ code > </ li >
77667915< li > < code > < a title ="adcp.client.ADCPClient.validate_content_delivery " href ="#adcp.client.ADCPClient.validate_content_delivery "> validate_content_delivery</ a > </ code > </ li >
77677916</ ul >
0 commit comments