Skip to content

Commit

Permalink
Merge 9e6858f into c4b868b
Browse files Browse the repository at this point in the history
  • Loading branch information
bramdevries committed Feb 3, 2023
2 parents c4b868b + 9e6858f commit 1d96d91
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/Ad/InLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,34 @@ public function setAdTitle(string $value): self
return $this;
}

/**
* Set Ad serving ID
*
* @param string $value
*
* @return InLine
*/
public function setAdServingId(string $value): self
{
$this->setScalarNodeCdata('AdServingId', $value);

return $this;
}

/**
* Set description
*
* @param string $value
*
* @return InLine
*/
public function setDescription(string $value): self
{
$this->setScalarNodeCdata('Description', $value);

return $this;
}

/**
* @return string[]
*/
Expand Down
2 changes: 2 additions & 0 deletions tests/DocumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public function testCreateInLineAdSection()
->setId('ad1')
->setAdSystem('Ad Server Name')
->setAdTitle('Ad Title')
->setAdServingId('my-ad-server-id')
->setDescription('Ad Description')
->addImpression('http://ad.server.com/impression', 'imp1');

// create creative for ad section
Expand Down
2 changes: 2 additions & 0 deletions tests/data/inlineAd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<InLine>
<AdSystem><![CDATA[Ad Server Name]]></AdSystem>
<AdTitle><![CDATA[Ad Title]]></AdTitle>
<AdServingId><![CDATA[my-ad-server-id]]></AdServingId>
<Description><![CDATA[Ad Description]]></Description>
<Impression id="imp1"><![CDATA[http://ad.server.com/impression]]></Impression>
<Creatives>
<Creative id="013d876d-14fc-49a2-aefd-744fce68365b" adId="pre">
Expand Down

0 comments on commit 1d96d91

Please sign in to comment.