[ 'description' => 'Totalized money', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/ProjectSupport.TotalizedMoney', ], ], ], ], ] ) )] #[API\Get()] #[API\Patch( security: 'is_granted("SUPPORT_EDIT", previous_object)', processor: SupportStateProcessor::class )] class SupportApiResource { #[API\ApiProperty(identifier: true, writable: false)] public int $id; /** * The Project being supported. */ #[API\ApiProperty(writable: false)] #[API\ApiFilter(filterClass: SearchFilter::class, strategy: 'exact')] public ProjectApiResource $project; /** * The Accounting of origin for the Transactions under this ProjectSupport record.\ * \ * When `anonymous` is *true* it will only be public to admins and the User. */ #[API\ApiProperty(writable: false, security: 'is_granted("SUPPORT_VIEW", object)')] #[API\ApiFilter(filterClass: SearchFilter::class, strategy: 'exact')] public ?AccountingApiResource $origin; /** * The Transactions that were issued to the Project by the origin. * * @var array */ #[API\ApiProperty(writable: false)] public array $transactions; /** * The total monetary value of the Transactions going to the Project. */ public MoneyWithConversion $money; /** * User's will to have their support to the Project be shown publicly. */ #[Assert\NotNull()] #[Assert\Type('bool')] #[API\ApiFilter(BooleanFilter::class)] public bool $anonymous = true; /** * A message of support from the User to the Project. */ public ?string $message = null; }