Skip to content

Commit

Permalink
Add CPA (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
l1a7t authored and Bukashk0zzz committed Mar 16, 2018
1 parent 73010b2 commit 8cdd3c4
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 16 deletions.
26 changes: 26 additions & 0 deletions src/Model/Offer/AbstractOffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ abstract class AbstractOffer implements OfferInterface
*/
private $countryOfOrigin;

/**
* @var int
*/
private $cpa;

/**
* @var array
*/
Expand Down Expand Up @@ -459,6 +464,26 @@ public function setCountryOfOrigin($countryOfOrigin)
return $this;
}

/**
* @return int
*/
public function getCpa()
{
return $this->cpa;
}

/**
* @param int $cpa
*
* @return $this
*/
public function setCpa($cpa)
{
$this->cpa = $cpa;

return $this;
}

/**
* @return array
*/
Expand Down Expand Up @@ -555,6 +580,7 @@ private function getFooterOptions()
'country_of_origin' => $this->getCountryOfOrigin(),
'downloadable' => $this->isDownloadable(),
'adult' => $this->isAdult(),
'cpa' => $this->getCpa(),
];
}
}
1 change: 1 addition & 0 deletions tests/AbstractGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ private function createOffers()
->setDownloadable($this->faker->boolean)
->setAdult($this->faker->boolean)
->setMarketCategory($this->faker->word)
->setCpa($this->faker->numberBetween(0, 1))
;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/dtd/ArtistTitle.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
picture*, store?, pickup?, delivery?, deliveryIncluded?, local_delivery_cost?, orderingTime?,
artist?, title, year?, media?, starring?, director?, originalName?, country?,
aliases?, additional*, description?, sales_notes?, promo?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?, cpa?,
age?,
barcode*,
param*,
Expand Down Expand Up @@ -145,5 +145,5 @@
<!ELEMENT is_premiere (#PCDATA)>
<!ELEMENT is_kids (#PCDATA)>
<!ELEMENT date (#PCDATA)>

<!ELEMENT cpa (#PCDATA)>

4 changes: 2 additions & 2 deletions tests/dtd/Audiobook.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
picture*, store?, pickup?, delivery?, deliveryIncluded?, local_delivery_cost?, orderingTime?,
author?, name, publisher?, series?, year?, ISBN?, volume?, part?, language?, table_of_contents?, performed_by?, performance_type?, storage?, format?, recording_length?,
aliases?, additional*, description?, sales_notes?, promo?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?, cpa?,
age?,
barcode*,
param*,
Expand Down Expand Up @@ -145,5 +145,5 @@
<!ELEMENT is_premiere (#PCDATA)>
<!ELEMENT is_kids (#PCDATA)>
<!ELEMENT date (#PCDATA)>

<!ELEMENT cpa (#PCDATA)>

4 changes: 2 additions & 2 deletions tests/dtd/Book.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
picture*, store?, pickup?, delivery?, deliveryIncluded?, local_delivery_cost?, orderingTime?,
author?, name, publisher?, series?, year?, ISBN?, volume?, part?, language?, binding?, page_extent?, table_of_contents?,
aliases?, additional*, description?, sales_notes?, promo?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?, cpa?,
age?,
barcode*,
param*,
Expand Down Expand Up @@ -145,5 +145,5 @@
<!ELEMENT is_premiere (#PCDATA)>
<!ELEMENT is_kids (#PCDATA)>
<!ELEMENT date (#PCDATA)>

<!ELEMENT cpa (#PCDATA)>

4 changes: 2 additions & 2 deletions tests/dtd/Custom.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
picture*, store?, pickup?, delivery?, deliveryIncluded?, local_delivery_cost?, orderingTime?,
typePrefix?, vendor, vendorCode?, model, (provider, tarifplan?)?,
aliases?, additional*, description?, sales_notes?, promo?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?, cpa?,
age?,
barcode*,
param*,
Expand Down Expand Up @@ -145,5 +145,5 @@
<!ELEMENT is_premiere (#PCDATA)>
<!ELEMENT is_kids (#PCDATA)>
<!ELEMENT date (#PCDATA)>

<!ELEMENT cpa (#PCDATA)>

4 changes: 2 additions & 2 deletions tests/dtd/EventTicket.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
picture*, store?, pickup?, delivery?, deliveryIncluded?, local_delivery_cost?, orderingTime?,
name, place, hall?, hall_part?, date, is_premiere?, is_kids?,
aliases?, additional*, description?, sales_notes?, promo?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?, cpa?,
age?,
barcode*,
param*,
Expand Down Expand Up @@ -145,5 +145,5 @@
<!ELEMENT is_premiere (#PCDATA)>
<!ELEMENT is_kids (#PCDATA)>
<!ELEMENT date (#PCDATA)>

<!ELEMENT cpa (#PCDATA)>

4 changes: 2 additions & 2 deletions tests/dtd/Original.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
(name, vendor?, vendorCode?)
),
aliases?, additional*, description?, sales_notes?, promo?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?, cpa?,
age?,
barcode*,
param*,
Expand Down Expand Up @@ -145,5 +145,5 @@
<!ELEMENT is_premiere (#PCDATA)>
<!ELEMENT is_kids (#PCDATA)>
<!ELEMENT date (#PCDATA)>

<!ELEMENT cpa (#PCDATA)>

4 changes: 2 additions & 2 deletions tests/dtd/Simple.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
picture*, store?, pickup?, delivery?, deliveryIncluded?, local_delivery_cost?, orderingTime?,
name, vendor?, vendorCode?,
aliases?, additional*, description?, sales_notes?, promo?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?, cpa?,
age?,
barcode*,
param*,
Expand Down Expand Up @@ -145,5 +145,5 @@
<!ELEMENT is_premiere (#PCDATA)>
<!ELEMENT is_kids (#PCDATA)>
<!ELEMENT date (#PCDATA)>

<!ELEMENT cpa (#PCDATA)>

4 changes: 2 additions & 2 deletions tests/dtd/Tour.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
picture*, store?, pickup?, delivery?, deliveryIncluded?, local_delivery_cost?, orderingTime?,
worldRegion?, country?, region?, days, dataTour*, name, hotel_stars?, room?, meal?, included, transport, price_min?, price_max?, options?,
aliases?, additional*, description?, sales_notes?, promo?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?,
manufacturer_warranty?, country_of_origin?, downloadable?, adult?, cpa?,
age?,
barcode*,
param*,
Expand Down Expand Up @@ -145,5 +145,5 @@
<!ELEMENT is_premiere (#PCDATA)>
<!ELEMENT is_kids (#PCDATA)>
<!ELEMENT date (#PCDATA)>

<!ELEMENT cpa (#PCDATA)>

0 comments on commit 8cdd3c4

Please sign in to comment.