# generated by datamodel-codegen:
# filename: commerce_notification_v1_oas3.yaml
# timestamp: 2026-04-07T06:52:28+00:00
from __future__ import annotations
from typing import Any, Dict, List, Optional
from pydantic import BaseModel, Field
class Config(BaseModel):
alertEmail: Optional[str] = Field(
None,
description='This field is used to add or modify an email address that will be used for Notification API alerts associated with the application. getConfig can be used to get the email address currently being used for alerts.',
)
class CreateSubscriptionFilterRequest(BaseModel):
filterSchema: Optional[Dict[str, Dict[str, Any]]] = Field(
None,
description='The content of a subscription filter as a valid JSON Schema Core document (version 2020-12 or later). The filterSchema provided must describe the subscription\'s notification payload such that it supplies valid criteria to filter the subscription\'s notifications.
Note: Not all topics can have filters applied to them. Use getTopic and getTopics requests to determine if a specific topic is filterable. Filterable topics have the boolean filterable returned as true in the response.
Note: If the JSON supplied as a subscription filter specifies a field that does not exist in the notifications for a topic, or if the topic is not filterable, the filter will be rejected and become DISABLED. If it is valid, however, the filter will move from PENDING status to ENABLED status.
Initially, when the createSubscriptionFilter request has been made, if the request has a valid JSON body a 201 Created is returned. After that, the validation of the filterSchema happens. See Creating a subscription filter for a topic for additional information.',
)
class DeliveryConfig(BaseModel):
endpoint: Optional[str] = Field(
None,
description='The endpoint for this destination.
Note: The provided endpoint URL should use the HTTPS protocol, and it should not contain an internal IP address or localhost in its path.',
)
verificationToken: Optional[str] = Field(
None,
description='The verification token associated with this endpoint.
Note: The provided verification token must be between 32 and 80 characters. Allowed characters include alphanumeric characters, underscores (_), and hyphens (-); no other characters are allowed.',
)
class Destination(BaseModel):
deliveryConfig: Optional[DeliveryConfig] = Field(
None, description='The configuration associated with this destination.'
)
destinationId: Optional[str] = Field(
None, description='The unique identifier for the destination.'
)
name: Optional[str] = Field(
None, description='The name associated with this destination.'
)
status: Optional[str] = Field(
None,
description='The status for this destination.
Note: The MARKED_DOWN value is set by eBay systems and cannot be used in a create or update call by applications.
Valid values:
ENABLEDDISABLEDMARKED_DOWNENABLED or DISABLED.JSON is the only supported format.',
)
schemaVersion: Optional[str] = Field(
None, description='The supported schema version.'
)
class PublicKey(BaseModel):
algorithm: Optional[str] = Field(
None,
description='The algorithm associated with the public key that is returned, such as Elliptic Curve Digital Signature Algorithm (ECDSA).',
)
digest: Optional[str] = Field(
None,
description='The digest associated with the public key that is returned, such as Secure Hash Algorithm 1 (SHA1).',
)
key: Optional[str] = Field(
None,
description='The public key that is returned for the specified key ID.HTTPS is currently the only supported delivery protocol of all notification topics. For implementation help, refer to eBay API documentation',
)
format: Optional[str] = Field(
None,
description='The supported data format of the payload.20 if omitted.',
)
next: Optional[str] = Field(
None,
description='The URL to access the next set of results. This field includes a continuation_token. No prev field is returned, but this value is persistent during the session so that you can use it to return to the next page.ENABLED or DISABLED. For implementation help, refer to eBay API documentation",
)
topicId: Optional[str] = Field(
None,
description='The unique identifier of the notification topic to subscribe to. Use getTopics to get topic IDs.',
)
class Error(BaseModel):
category: Optional[str] = Field(None, description='Identifies the type of erro.')
domain: Optional[str] = Field(
None,
description='Name for the primary system where the error occurred. This is relevant for application errors.',
)
errorId: Optional[int] = Field(
None, description='A unique number to identify the error.'
)
inputRefIds: Optional[List[str]] = Field(
None,
description='An array of request elements most closely associated to the error.',
)
longMessage: Optional[str] = Field(
None, description='A more detailed explanation of the error.'
)
message: Optional[str] = Field(
None,
description="Information on how to correct the problem, in the end user's terms and language where applicable.",
)
outputRefIds: Optional[List[str]] = Field(
None,
description='An array of request elements most closely associated to the error.',
)
parameters: Optional[List[ErrorParameter]] = Field(
None,
description='An array of name/value pairs that describe details the error condition. These are useful when multiple errors are returned.',
)
subdomain: Optional[str] = Field(
None,
description='Further helps indicate which subsystem the error is coming from. System subcategories include: Initialization, Serialization, Security, Monitoring, Rate Limiting, etc.',
)
class Subscription(BaseModel):
creationDate: Optional[str] = Field(
None, description='The creation date for this subscription.'
)
destinationId: Optional[str] = Field(
None,
description='The unique identifier for the destination associated with this subscription.',
)
filterId: Optional[str] = Field(
None,
description='The unique identifier for the filter associated with this subscription.',
)
payload: Optional[SubscriptionPayloadDetail] = Field(
None, description='The payload associated with this subscription.'
)
status: Optional[str] = Field(
None,
description="The status of this subscription. For implementation help, refer to eBay API documentation",
)
subscriptionId: Optional[str] = Field(
None, description='The unique identifier for the subscription.'
)
topicId: Optional[str] = Field(
None,
description='The unique identifier for the topic associated with this subscription.',
)
class SubscriptionSearchResponse(BaseModel):
href: Optional[str] = Field(
None,
description='The path to the call URI that produced the current page of results.',
)
limit: Optional[int] = Field(
None,
description='The value of the limit parameter submitted in the request, which is the maximum number of items to return per page, from the result set. A result set is the complete set of results returned by the method.20 if omitted.