# yatra/3.0.7/app/Contracts/ServiceInterface.php

Yatra – Travel Booking &amp; Tour Operator Software, version 3.0.7. 49 lines.

- Page: https://pluginprobe.com/plugins/yatra/3.0.7/code/app/Contracts/ServiceInterface.php
- Raw: https://pluginprobe.com/plugins/yatra/3.0.7/raw/app/Contracts/ServiceInterface.php
- Modified: 2026-04-14T03:47:24+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/yatra/3.0.7/code/app/Contracts/ServiceInterface.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace Yatra\Contracts;

/**
 * Service Interface
 * 
 * Defines standard contract for all service classes
 */
interface ServiceInterface
{
    /**
     * Get item by ID
     */
    public function getById(int $id): ?\stdClass;

    /**
     * Get all items with filters
     */
    public function getAll(array $filters = []): array;

    /**
     * Create new item
     */
    public function create(array $data): int;

    /**
     * Update existing item
     */
    public function update(int $id, array $data): bool;

    /**
     * Delete item
     */
    public function delete(int $id): bool;

    /**
     * Validate data for creation
     */
    public function validateCreate(array $data): void;

    /**
     * Validate data for update
     */
    public function validateUpdate(int $id, array $data): void;
}

```
