<?php
 declare(strict_types=1); namespace Shopify\Rest\Admin2025_04; use Shopify\Auth\Session; use Shopify\Rest\Base; class Event extends Base { public static string $API_VERSION = "2025-04"; protected static array $HAS_ONE = []; protected static array $HAS_MANY = []; protected static array $PATHS = [ ["http_method" => "get", "operation" => "count", "ids" => [], "path" => "events/count.json"], ["http_method" => "get", "operation" => "get", "ids" => [], "path" => "events.json"], ["http_method" => "get", "operation" => "get", "ids" => ["id"], "path" => "events/<id>.json"], ["http_method" => "get", "operation" => "get", "ids" => ["order_id"], "path" => "orders/<order_id>/events.json"], ["http_method" => "get", "operation" => "get", "ids" => ["product_id"], "path" => "products/<product_id>/events.json"] ]; public static function find( Session $session, $id, array $urlIds = [], array $params = [] ): ?Event { $result = parent::baseFind( $session, array_merge(["id" => $id], $urlIds), $params, ); return !empty($result) ? $result[0] : null; } public static function all( Session $session, array $urlIds = [], array $params = [] ): array { return parent::baseFind( $session, $urlIds, $params, ); } public static function count( Session $session, array $urlIds = [], array $params = [] ): ?array { $response = parent::request( "get", "count", $session, [], $params, [], ); return $response->getDecodedBody(); } } 