Methods

Command-pattern objects representing API endpoints (aiogram-style).

PlategaMethod

class aioplatega.methods.base.PlategaMethod[source]

Bases: PlategaObject, Generic[PlategaType]

Base class for all Platega API methods (command pattern).

Subclasses must specify:
  • __api_method__: URL path (may contain {field_name} placeholders).

  • __http_method__: "GET" or "POST".

  • __returning__: response model class.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'defer_build': True, 'extra': 'allow', 'frozen': True, 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

CreateTransaction

class aioplatega.methods.create_transaction.CreateTransaction[source]

Bases: PlategaMethod[CreateTransactionResponse]

payment_method: PaymentMethodInt
payment_details: PaymentDetails
description: Optional[str]
return_url: Optional[str]
failed_url: Optional[str]
payload: Optional[str]
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'defer_build': True, 'extra': 'allow', 'frozen': True, 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

GetTransactionStatus

class aioplatega.methods.get_transaction_status.GetTransactionStatus[source]

Bases: PlategaMethod[TransactionStatusResponse]

transaction_id: UUID
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'defer_build': True, 'extra': 'allow', 'frozen': True, 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

GetRate

class aioplatega.methods.get_rate.GetRate[source]

Bases: PlategaMethod[RateResponse]

merchant_id: str
payment_method: int
currency_from: str
currency_to: str
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'defer_build': True, 'extra': 'allow', 'frozen': True, 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

GetConversions

class aioplatega.methods.get_conversions.GetConversions[source]

Bases: PlategaMethod[ConversionsResponse]

from_date: Optional[str]
to_date: Optional[str]
page: int
size: int
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'defer_build': True, 'extra': 'allow', 'frozen': True, 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].