src/DTO/SubscriberOutputDTO.php line 8

  1. <?php
  2. namespace App\DTO;
  3. use ApiPlatform\Metadata\ApiProperty;
  4. use JetBrains\PhpStorm\ArrayShape;
  5. class SubscriberOutputDTO
  6. {
  7.     #[ArrayShape([
  8.         "id" => "string",
  9.         "names" => "string",
  10.     ])]
  11.     #[ApiProperty(requiredtrueopenapiContext: [
  12.         "type" => "object",
  13.         "properties" => [
  14.             "id" => ["example" => "123456789""type" => "string"],
  15.             "names" => ["example" => "juan""type" => "string"],
  16.         ],
  17.     ])]
  18.     public array $subscriber;
  19.     #[ArrayShape([
  20.         "id" => "string",
  21.         "finalDate" => "string"
  22.     ])]
  23.     #[ApiProperty(requiredtrueopenapiContext: [
  24.         "type" => "object",
  25.         "properties" => [
  26.             "id" => ["example" => "123456789""type" => "string"],
  27.             "finalDate" => ["example" => "05-04-1998 12:00""type" => "string"]
  28.         ],
  29.     ])]
  30.     public array $freeTrial;
  31.     #[ArrayShape([
  32.         "id" => "string",
  33.         "status" => "string",
  34.         "planId" => "string",
  35.         "plan" => "string",
  36.         "nextRenewalDate" => "string",
  37.     ])]
  38.     #[ApiProperty(requiredtrueopenapiContext: [
  39.         "type" => "object",
  40.         "properties" => [
  41.             "id" => ["example" => "123456789""type" => "string"],
  42.             "status" => ["example" => "someStatus""type" => "string"],
  43.             "planId" => ["example" => "someId""type" => "string"],
  44.             "plan" => ["example" => "somePlan""type" => "string"],
  45.             "nextRenewalDate" => ["example" => "someRenewalDate""type" => "string"],
  46.         ],
  47.     ])]
  48.     public array $subscription;
  49. }