Skip to content

Commit ebeda95

Browse files
fix: Drop pricing_infos from CreateActorRequest and clarify apify_margin_percentage docs (#1031)
- Regenerates the Pydantic models, TypedDicts, and literal aliases from the [published OpenAPI specification](https://docs.apify.com/api/openapi.json), and records its version in `pyproject.toml`. - Specification version: `v2-2026-08-24T085852Z` - **unchanged**, which doesn't rule out a specification change: the published stamp can lag its content by a deploy. Only the diff tells.
1 parent 28efd13 commit ebeda95

1 file changed

Lines changed: 7 additions & 14 deletions

File tree

‎src/apify_client/_models.py‎

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,10 @@ class CommonActorPricingInfo(BaseModel):
735735
populate_by_name=True,
736736
alias_generator=to_camel,
737737
)
738-
apify_margin_percentage: float
738+
apify_margin_percentage: Annotated[float, Field(examples=[0.2])]
739739
"""
740-
In [0, 1], fraction of pricePerUnitUsd that goes to Apify
740+
Apify's share of the revenue generated under this pricing info record, as a fraction between 0 and 1. Set by the Apify platform.
741+
741742
"""
742743
created_at: AwareDatetime
743744
"""
@@ -792,18 +793,6 @@ class CreateActorRequest(BaseModel):
792793
"""
793794
An array of `Version` objects. Each object represents a specific version of the Actor's source code: its location, builds, and environment configuration.
794795
"""
795-
pricing_infos: (
796-
list[
797-
Annotated[
798-
PayPerEventActorPricingInfo
799-
| PricePerDatasetItemActorPricingInfo
800-
| FlatPricePerMonthActorPricingInfo
801-
| FreeActorPricingInfo,
802-
Field(discriminator='pricing_model'),
803-
]
804-
]
805-
| None
806-
) = None
807796
categories: Annotated[list[str] | None, Field(examples=[['SOCIAL_MEDIA']])] = None
808797
"""
809798
A list of categories that best define the Actor. Reflected in Apify Store's search and filtering options.
@@ -920,6 +909,10 @@ class CurrentPricingInfo(BaseModel):
920909
)
921910
pricing_model: Annotated[str, Field(examples=['FREE'])]
922911
apify_margin_percentage: Annotated[float | None, Field(examples=[0.2])] = None
912+
"""
913+
Apify's share of the revenue generated under this pricing info record, as a fraction between 0 and 1. Set by the Apify platform.
914+
915+
"""
923916
created_at: Annotated[AwareDatetime | None, Field(examples=['2023-01-01T00:00:00.000Z'])] = None
924917
started_at: Annotated[AwareDatetime | None, Field(examples=['2023-01-01T00:00:00.000Z'])] = None
925918
notified_about_change_at: Annotated[AwareDatetime | None, Field(examples=[None])] = None

0 commit comments

Comments
 (0)