Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
66.67% covered (warning)
66.67%
2 / 3
66.67% covered (warning)
66.67%
2 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
GroupOlxMappedListingData
66.67% covered (warning)
66.67%
2 / 3
66.67% covered (warning)
66.67%
2 / 3
3.33
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 listingId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 title
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3declare(strict_types=1);
4
5namespace ImovelZapAi\Publishing\Connectors\GroupOlx\Application\Data;
6
7use ImovelZapAi\Publishing\Connectors\GroupOlx\Domain\Enums\GroupOlxPropertyType;
8use ImovelZapAi\Publishing\Connectors\GroupOlx\Domain\Enums\GroupOlxTransactionType;
9use ImovelZapAi\Publishing\Domain\Feeds\VrSync\ListingDataFeedListing;
10
11/**
12 * DTO pronto para serialização XML VRSync — sem gerar XML nesta etapa.
13 */
14final readonly class GroupOlxMappedListingData
15{
16    public function __construct(
17        public ListingDataFeedListing $listing,
18        public GroupOlxTransactionType $transactionType,
19        public GroupOlxPropertyType $propertyType,
20        public string $usageType,
21        public ?string $listPrice,
22        public ?string $rentalPrice,
23    ) {}
24
25    public function listingId(): string
26    {
27        return $this->listing->listingId;
28    }
29
30    public function title(): string
31    {
32        return $this->listing->title;
33    }
34}